From e44d3c084066624111f65a61c93e40c9afa9a720 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 25 Apr 2025 15:09:25 -0700 Subject: [PATCH 1/2] Raise required toolchain to Rust 1.82 This is required by bindgen 0.71, which is used by libsqlite3-sys 0.31. error: extern block cannot be declared unsafe --> target/debug/build/libsqlite3-sys-3da8b75ff8e55f52/out/bindgen.rs:521:1 | 521 | unsafe extern "C" { | ^^^^^^ --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 29f0b09695..fef4343742 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ # Note: should NOT increase during a minor/patch release cycle [toolchain] -channel = "1.78" +channel = "1.82" profile = "minimal" From 7cc1206fcd104f5f7a3e7559b5f98f175898a041 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 25 Apr 2025 14:56:04 -0700 Subject: [PATCH 2/2] Update to libsqlite3-sys 0.31 --- Cargo.lock | 34 +++++++++++++++++++++++++++++----- Cargo.toml | 4 ++-- sqlx-sqlite/Cargo.toml | 2 +- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e19b2e33c8..2054ee51af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -354,7 +354,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "923ded50f602b3007e5e63e3f094c479d9c8a9b42d7f4034e4afe456aa48bfd2" dependencies = [ - "bindgen", + "bindgen 0.69.5", "cc", "cmake", "dunce", @@ -499,12 +499,30 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.96", "which", ] +[[package]] +name = "bindgen" +version = "0.71.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +dependencies = [ + "bitflags 2.7.0", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.1", + "shlex", + "syn 2.0.96", +] + [[package]] name = "bit-vec" version = "0.6.3" @@ -2082,11 +2100,11 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.30.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +checksum = "ad8935b44e7c13394a179a438e0cebba0fe08fe01b54f152e29a93b5cf993fd4" dependencies = [ - "bindgen", + "bindgen 0.71.1", "cc", "pkg-config", "vcpkg", @@ -2986,6 +3004,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + [[package]] name = "rustix" version = "0.37.28" diff --git a/Cargo.toml b/Cargo.toml index 1aef121199..7327869614 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -192,13 +192,13 @@ rand_xoshiro = "0.6.0" hex = "0.4.3" tempfile = "3.10.1" criterion = { version = "0.5.1", features = ["async_tokio"] } -libsqlite3-sys = { version = "0.30.1" } +libsqlite3-sys = { version = "0.31.0" } # If this is an unconditional dev-dependency then Cargo will *always* try to build `libsqlite3-sys`, # even when SQLite isn't the intended test target, and fail if the build environment is not set up for compiling C code. [target.'cfg(sqlite_test_sqlcipher)'.dev-dependencies] # Enable testing with SQLCipher if specifically requested. -libsqlite3-sys = { version = "0.30.1", features = ["bundled-sqlcipher"] } +libsqlite3-sys = { version = "0.31.0", features = ["bundled-sqlcipher"] } # Common lint settings for the workspace [workspace.lints.clippy] diff --git a/sqlx-sqlite/Cargo.toml b/sqlx-sqlite/Cargo.toml index 5ad57546e7..0347a3e5d1 100644 --- a/sqlx-sqlite/Cargo.toml +++ b/sqlx-sqlite/Cargo.toml @@ -56,7 +56,7 @@ serde = { version = "1.0.145", features = ["derive"], optional = true } regex = { version = "1.5.5", optional = true } [dependencies.libsqlite3-sys] -version = "0.30.1" +version = "0.31.0" default-features = false features = [ "pkg-config",