Skip to content

Commit

Permalink
fix(readme): show runtime features in quickstart
Browse files Browse the repository at this point in the history
closes #1492
  • Loading branch information
abonander authored Nov 10, 2021
1 parent 51954fe commit 35c5e32
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,18 @@ of SQLx.

```toml
[dependencies]
sqlx = { version = "0.4.1", features = [ "postgres" ] }
async-std = { version = "1.6", features = [ "attributes" ] }
# PICK ONE:
# Async-std:
sqlx = { version = "0.5", features = [ "runtime-async-std-native-tls", "postgres" ] }
async-std = { version = "1", features = [ "attributes" ] }

# Tokio:
sqlx = { version = "0.5", features = [ "runtime-tokio-native-tls" , "postgres" ] }
tokio = { version = "1", features = ["full"] }

# Actix-web:
sqlx = { version = "0.5", features = [ "runtime-actix-native-tls" , "postgres" ] }
actix-web = "3"
```

```rust
Expand All @@ -214,6 +224,7 @@ use sqlx::postgres::PgPoolOptions;

#[async_std::main]
// or #[tokio::main]
// or #[actix_web::main]
async fn main() -> Result<(), sqlx::Error> {
// Create a connection pool
// for MySQL, use MySqlPoolOptions::new()
Expand Down

0 comments on commit 35c5e32

Please sign in to comment.