Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SeaORM/docs/01-introduction/02-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Async programming in Rust is a recent development, only having been stabilized i

The first thing to learn is the [`Future`](https://rust-lang.github.io/async-book/02_execution/02_future.html) trait. It's a placeholder for a function that will compute and return some value in the future. It's lazy, meaning `.await` must be called for any actual work to be done. `Future` allows us to achieve concurrency with little programming effort, e.g. [`future::join_all`](https://docs.rs/futures/latest/futures/future/fn.join_all.html) to execute multiple queries in parallel.

Second, `async` in Rust is [multi-threaded programming](https://rust-lang.github.io/async-book/03_async_await/01_chapter.html) with syntactic sugar. A `Future` may move between threads, so any variables used in async bodies must be able to travel between threads, i.e. [`Send`](https://doc.rust-lang.org/nomicon/send-and-sync.html).
Second, in multi-threaded async executor, a `Future` may move between threads, so any variables used in async bodies must be able to travel between threads, i.e. [`Send`](https://doc.rust-lang.org/nomicon/send-and-sync.html).

Third, there are multiple async runtimes in Rust. [`async-std`](https://crates.io/crates/async-std) and [`tokio`](https://crates.io/crates/tokio) are the two most widely used. SeaORM's underlying driver, [`SQLx`](https://crates.io/crates/sqlx), supports both.

Expand Down
8 changes: 8 additions & 0 deletions SeaORM/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ module.exports = {
organizationName: 'SeaQL',
projectName: 'sea-orm',
trailingSlash: true,
i18n: {
defaultLocale: 'en',
locales: ['en', 'zh-Hans'],
},
themeConfig: {
colorMode: {
respectPrefersColorScheme: true,
Expand Down Expand Up @@ -80,6 +84,10 @@ module.exports = {
position: 'right',
dropdownActiveClassDisabled: true,
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
Expand Down
Loading
Loading