From 6d8f470cf508169422dd1330a6021eccc6e1471c Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Sun, 6 Feb 2022 16:14:37 -0600 Subject: [PATCH 1/2] docs: Add a snippet about opt levels for `sqlx-macros` --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 09d5b38631..54973fe9d1 100644 --- a/README.md +++ b/README.md @@ -413,6 +413,16 @@ modifications (to the database-accessing parts of the code) are done, you can en to cache the results of the SQL query analysis using the `sqlx` command-line tool. See [sqlx-cli/README.md](./sqlx-cli/README.md#enable-building-in-offline-mode-with-query). +Compile time verified queries does quite a bit of work at compile time. Incremental actions like +`cargo check` and `cargo build` can be significantly faster when using an optimized build by +putting the following in your `Cargo.toml` (More information in the +[Profiles section](https://doc.rust-lang.org/cargo/reference/profiles.html) of The Cargo Book) + +```toml +[profile.dev.package.sqlx-macros] +opt-level = 3 +``` + ## Safety This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in 100% Safe Rust. From 0ebf98ca49946ef82b22ee3bad85b3ad0065cc5a Mon Sep 17 00:00:00 2001 From: Lovecraftian Horror Date: Sun, 6 Feb 2022 16:15:37 -0600 Subject: [PATCH 2/2] docs: Fix does -> do --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54973fe9d1..7ed95b0e6a 100644 --- a/README.md +++ b/README.md @@ -413,7 +413,7 @@ modifications (to the database-accessing parts of the code) are done, you can en to cache the results of the SQL query analysis using the `sqlx` command-line tool. See [sqlx-cli/README.md](./sqlx-cli/README.md#enable-building-in-offline-mode-with-query). -Compile time verified queries does quite a bit of work at compile time. Incremental actions like +Compile time verified queries do quite a bit of work at compile time. Incremental actions like `cargo check` and `cargo build` can be significantly faster when using an optimized build by putting the following in your `Cargo.toml` (More information in the [Profiles section](https://doc.rust-lang.org/cargo/reference/profiles.html) of The Cargo Book)