Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop winsqlite3 feature #1433

Merged
merged 3 commits into from Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/main.yml
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions Cargo.toml
Expand Up @@ -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"]

Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -137,7 +137,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
* `serialize` exposes [`sqlite3_serialize`](http://sqlite.org/c3ref/serialize.html) (3.23.0).

## Notes on building rusqlite and libsqlite3-sys
Expand Down
7 changes: 0 additions & 7 deletions libsqlite3-sys/Cargo.toml
Expand Up @@ -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 }

Expand Down
41 changes: 0 additions & 41 deletions libsqlite3-sys/build.rs
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -514,9 +506,6 @@ mod bindings {
use bindgen::callbacks::{IntKind, ParseCallbacks};

use std::path::Path;

use super::win_target;

#[derive(Debug)]
struct SqliteTypeChooser;

Expand Down Expand Up @@ -599,36 +588,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
Expand Down
3 changes: 0 additions & 3 deletions libsqlite3-sys/src/lib.rs
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions libsqlite3-sys/wrapper.h
@@ -1,5 +1 @@
#ifdef BINDGEN_USE_WINSQLITE3
#include <winsqlite/winsqlite3.h>
#else
#include "sqlite3.h"
#endif