mirror of
https://github.com/isar/rusqlite.git
synced 2025-03-25 23:06:04 +08:00
Drop winsqlite3 feature
This commit is contained in:
parent
88faf4345b
commit
01a2cc51a5
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@ -122,18 +122,6 @@ jobs:
|
||||
- run: cargo test --features 'bundled-full session buildtime_bindgen' --all-targets --workspace --verbose
|
||||
- run: cargo test --features 'bundled-full session buildtime_bindgen' --doc --workspace --verbose
|
||||
|
||||
winsqlite3:
|
||||
name: Test with winsqlite3
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: hecrj/setup-rust-action@v1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
# TODO: Should this test GNU toolchain? What about +crt-static?
|
||||
# TODO: Is it worth testing other features?
|
||||
- run: cargo build --features winsqlite3 --workspace --all-targets --verbose
|
||||
- run: cargo test --features winsqlite3 --workspace --all-targets --verbose
|
||||
|
||||
sqlcipher:
|
||||
name: Test with sqlcipher
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -76,8 +76,6 @@ bundled-windows = ["libsqlite3-sys/bundled-windows"]
|
||||
with-asan = ["libsqlite3-sys/with-asan"]
|
||||
column_decltype = []
|
||||
wasm32-wasi-vfs = ["libsqlite3-sys/wasm32-wasi-vfs"]
|
||||
# Note: doesn't support 32-bit.
|
||||
winsqlite3 = ["libsqlite3-sys/winsqlite3"]
|
||||
# 3.23.0
|
||||
serialize = ["modern_sqlite"]
|
||||
|
||||
|
@ -136,7 +136,6 @@ features](https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-s
|
||||
* `extra_check` fail when a query passed to execute is readonly or has a column count > 0.
|
||||
* `column_decltype` provides `columns()` method for Statements and Rows; omit if linking to a version of SQLite/SQLCipher compiled with `-DSQLITE_OMIT_DECLTYPE`.
|
||||
* `collation` exposes [`sqlite3_create_collation_v2`](https://sqlite.org/c3ref/create_collation.html).
|
||||
* `winsqlite3` allows linking against the SQLite present in newer versions of Windows
|
||||
|
||||
## Notes on building rusqlite and libsqlite3-sys
|
||||
|
||||
|
@ -34,13 +34,6 @@ in_gecko = []
|
||||
with-asan = []
|
||||
wasm32-wasi-vfs = []
|
||||
|
||||
# lowest version shipped with Windows 10.0.10586 was 3.8.8.3
|
||||
#
|
||||
# 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
|
||||
# in the future.
|
||||
winsqlite3 = []
|
||||
|
||||
[dependencies]
|
||||
openssl-sys = { version = "0.9", optional = true }
|
||||
|
||||
|
@ -331,8 +331,6 @@ fn env_prefix() -> &'static str {
|
||||
fn lib_name() -> &'static str {
|
||||
if cfg!(any(feature = "sqlcipher", feature = "bundled-sqlcipher")) {
|
||||
"sqlcipher"
|
||||
} else if cfg!(all(windows, feature = "winsqlite3")) {
|
||||
"winsqlite3"
|
||||
} else {
|
||||
"sqlite3"
|
||||
}
|
||||
@ -433,12 +431,6 @@ mod build_linked {
|
||||
#[cfg(not(feature = "loadable_extension"))]
|
||||
println!("cargo:link-target={link_lib}");
|
||||
|
||||
if win_target() && cfg!(feature = "winsqlite3") {
|
||||
#[cfg(not(feature = "loadable_extension"))]
|
||||
println!("cargo:rustc-link-lib=dylib={link_lib}");
|
||||
return HeaderLocation::Wrapper;
|
||||
}
|
||||
|
||||
// Allow users to specify where to find SQLite.
|
||||
if let Ok(dir) = env::var(format!("{}_LIB_DIR", env_prefix())) {
|
||||
// Try to use pkg-config to determine link commands
|
||||
@ -599,36 +591,6 @@ mod bindings {
|
||||
if cfg!(feature = "session") {
|
||||
bindings = bindings.clang_arg("-DSQLITE_ENABLE_SESSION");
|
||||
}
|
||||
if win_target() && cfg!(feature = "winsqlite3") {
|
||||
bindings = bindings
|
||||
.clang_arg("-DBINDGEN_USE_WINSQLITE3")
|
||||
.blocklist_item("NTDDI_.+")
|
||||
.blocklist_item("WINAPI_FAMILY.*")
|
||||
.blocklist_item("_WIN32_.+")
|
||||
.blocklist_item("_VCRT_COMPILER_PREPROCESSOR")
|
||||
.blocklist_item("_SAL_VERSION")
|
||||
.blocklist_item("__SAL_H_VERSION")
|
||||
.blocklist_item("_USE_DECLSPECS_FOR_SAL")
|
||||
.blocklist_item("_USE_ATTRIBUTES_FOR_SAL")
|
||||
.blocklist_item("_CRT_PACKING")
|
||||
.blocklist_item("_HAS_EXCEPTIONS")
|
||||
.blocklist_item("_STL_LANG")
|
||||
.blocklist_item("_HAS_CXX17")
|
||||
.blocklist_item("_HAS_CXX20")
|
||||
.blocklist_item("_HAS_NODISCARD")
|
||||
.blocklist_item("WDK_NTDDI_VERSION")
|
||||
.blocklist_item("OSVERSION_MASK")
|
||||
.blocklist_item("SPVERSION_MASK")
|
||||
.blocklist_item("SUBVERSION_MASK")
|
||||
.blocklist_item("WINVER")
|
||||
.blocklist_item("__security_cookie")
|
||||
.blocklist_type("size_t")
|
||||
.blocklist_type("__vcrt_bool")
|
||||
.blocklist_type("wchar_t")
|
||||
.blocklist_function("__security_init_cookie")
|
||||
.blocklist_function("__report_gsfailure")
|
||||
.blocklist_function("__va_start");
|
||||
}
|
||||
|
||||
// When cross compiling unless effort is taken to fix the issue, bindgen
|
||||
// will find the wrong headers. There's only one header included by the
|
||||
|
@ -5,9 +5,6 @@
|
||||
#[cfg(feature = "bundled-sqlcipher-vendored-openssl")]
|
||||
extern crate openssl_sys;
|
||||
|
||||
#[cfg(all(windows, feature = "winsqlite3", target_pointer_width = "32"))]
|
||||
compile_error!("The `libsqlite3-sys/winsqlite3` feature is not supported on 32 bit targets.");
|
||||
|
||||
pub use self::error::*;
|
||||
|
||||
use std::default::Default;
|
||||
|
@ -1,5 +1 @@
|
||||
#ifdef BINDGEN_USE_WINSQLITE3
|
||||
#include <winsqlite/winsqlite3.h>
|
||||
#else
|
||||
#include "sqlite3.h"
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user