Remove min_sqlite_version_3_7_16 feature

And associated bindgen
This commit is contained in:
gwenn 2022-08-22 18:38:59 +02:00 committed by Thom Chiovoloni
parent 6766d6a6cd
commit 2dd11143c9
5 changed files with 8 additions and 2315 deletions

View File

@ -35,16 +35,16 @@ members = ["libsqlite3-sys"]
[features] [features]
load_extension = [] load_extension = []
# hot-backup interface: 3.6.11 (2009-02-18) # hot-backup interface: 3.6.11 (2009-02-18)
backup = ["libsqlite3-sys/min_sqlite_version_3_7_16"] backup = []
# sqlite3_blob_reopen: 3.7.4 # sqlite3_blob_reopen: 3.7.4
blob = ["libsqlite3-sys/min_sqlite_version_3_7_16"] blob = []
collation = [] collation = []
# sqlite3_create_function_v2: 3.7.3 (2010-10-08) # sqlite3_create_function_v2: 3.7.3 (2010-10-08)
functions = ["libsqlite3-sys/min_sqlite_version_3_7_16"] functions = []
# sqlite3_log: 3.6.23 (2010-03-09) # sqlite3_log: 3.6.23 (2010-03-09)
trace = ["libsqlite3-sys/min_sqlite_version_3_7_16"] trace = []
# sqlite3_db_release_memory: 3.7.10 (2012-01-16) # sqlite3_db_release_memory: 3.7.10 (2012-01-16)
release_memory = ["libsqlite3-sys/min_sqlite_version_3_7_16"] release_memory = []
bundled = ["libsqlite3-sys/bundled", "modern_sqlite"] bundled = ["libsqlite3-sys/bundled", "modern_sqlite"]
bundled-sqlcipher = ["libsqlite3-sys/bundled-sqlcipher", "bundled"] bundled-sqlcipher = ["libsqlite3-sys/bundled-sqlcipher", "bundled"]
bundled-sqlcipher-vendored-openssl = ["libsqlite3-sys/bundled-sqlcipher-vendored-openssl", "bundled-sqlcipher"] bundled-sqlcipher-vendored-openssl = ["libsqlite3-sys/bundled-sqlcipher-vendored-openssl", "bundled-sqlcipher"]
@ -55,7 +55,7 @@ i128_blob = []
sqlcipher = ["libsqlite3-sys/sqlcipher"] sqlcipher = ["libsqlite3-sys/sqlcipher"]
unlock_notify = ["libsqlite3-sys/unlock_notify"] unlock_notify = ["libsqlite3-sys/unlock_notify"]
# xSavepoint, xRelease and xRollbackTo: 3.7.7 (2011-06-23) # xSavepoint, xRelease and xRollbackTo: 3.7.7 (2011-06-23)
vtab = ["libsqlite3-sys/min_sqlite_version_3_7_16"] vtab = []
csvtab = ["csv", "vtab"] csvtab = ["csv", "vtab"]
# pointer passing interfaces: 3.20.0 # pointer passing interfaces: 3.20.0
array = ["vtab"] array = ["vtab"]

View File

@ -191,7 +191,6 @@ minimum SQLite version that supports your chosen features. If you are using
`libsqlite3-sys` directly, you can use the same features to choose which `libsqlite3-sys` directly, you can use the same features to choose which
pregenerated bindings are chosen: pregenerated bindings are chosen:
* `min_sqlite_version_3_7_16` - SQLite 3.7.16 bindings
* `min_sqlite_version_3_14_0` - SQLite 3.14.0 bindings (this is the default) * `min_sqlite_version_3_14_0` - SQLite 3.14.0 bindings (this is the default)
If you use any of the `bundled` features, you will get pregenerated bindings for the If you use any of the `bundled` features, you will get pregenerated bindings for the

View File

@ -19,7 +19,6 @@ bundled-sqlcipher = ["bundled"]
bundled-sqlcipher-vendored-openssl = ["bundled-sqlcipher", "openssl-sys/vendored"] bundled-sqlcipher-vendored-openssl = ["bundled-sqlcipher", "openssl-sys/vendored"]
buildtime_bindgen = ["bindgen", "pkg-config", "vcpkg"] buildtime_bindgen = ["bindgen", "pkg-config", "vcpkg"]
sqlcipher = [] sqlcipher = []
min_sqlite_version_3_7_16 = ["pkg-config", "vcpkg"]
min_sqlite_version_3_14_0 = ["pkg-config", "vcpkg"] min_sqlite_version_3_14_0 = ["pkg-config", "vcpkg"]
# Bundle only the bindings file. Note that this does nothing if # Bundle only the bindings file. Note that this does nothing if
# `buildtime_bindgen` is enabled. # `buildtime_bindgen` is enabled.
@ -39,7 +38,7 @@ wasm32-wasi-vfs = []
# Note that because `winsqlite3.dll` exports SQLite functions using a atypical # Note that because `winsqlite3.dll` exports SQLite functions using a atypical
# ABI on 32-bit systems, this is currently unsupported on these. This may change # ABI on 32-bit systems, this is currently unsupported on these. This may change
# in the future. # in the future.
winsqlite3 = ["min_sqlite_version_3_7_16"] winsqlite3 = []
[dependencies] [dependencies]
openssl-sys = { version = "0.9", optional = true } openssl-sys = { version = "0.9", optional = true }

File diff suppressed because it is too large Load Diff

View File

@ -473,15 +473,7 @@ mod bindings {
use std::fs; use std::fs;
use std::path::Path; use std::path::Path;
static PREBUILT_BINDGEN_PATHS: &[&str] = &[ static PREBUILT_BINDGEN_PATHS: &[&str] = &["bindgen-bindings/bindgen_3.14.0.rs"];
#[cfg(feature = "min_sqlite_version_3_7_16")]
"bindgen-bindings/bindgen_3.7.16.rs",
#[cfg(any(
feature = "min_sqlite_version_3_14_0",
not(any(feature = "min_sqlite_version_3_7_16",))
))]
"bindgen-bindings/bindgen_3.14.0.rs",
];
pub fn write_to_out_dir(_header: HeaderLocation, out_path: &Path) { pub fn write_to_out_dir(_header: HeaderLocation, out_path: &Path) {
let in_path = PREBUILT_BINDGEN_PATHS[PREBUILT_BINDGEN_PATHS.len() - 1]; let in_path = PREBUILT_BINDGEN_PATHS[PREBUILT_BINDGEN_PATHS.len() - 1];