mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
Add feature flag to include wasm32-wasi-vfs.c
This commit is contained in:
parent
1483f1cdf5
commit
464b8283b2
@ -60,6 +60,7 @@ bundled-windows = ["libsqlite3-sys/bundled-windows"]
|
|||||||
# Build bundled sqlite with -fsanitize=address
|
# Build bundled sqlite with -fsanitize=address
|
||||||
with-asan = ["libsqlite3-sys/with-asan"]
|
with-asan = ["libsqlite3-sys/with-asan"]
|
||||||
column_decltype = []
|
column_decltype = []
|
||||||
|
wasm32-wasi-vfs = ["libsqlite3-sys/wasm32-wasi-vfs"]
|
||||||
|
|
||||||
# Helper feature for enabling both `bundled` and most non-build-related optional
|
# Helper feature for enabling both `bundled` and most non-build-related optional
|
||||||
# features or dependencies. This is useful for running tests / clippy / etc. New
|
# features or dependencies. This is useful for running tests / clippy / etc. New
|
||||||
|
@ -32,6 +32,7 @@ preupdate_hook = ["buildtime_bindgen"]
|
|||||||
session = ["preupdate_hook", "buildtime_bindgen"]
|
session = ["preupdate_hook", "buildtime_bindgen"]
|
||||||
in_gecko = []
|
in_gecko = []
|
||||||
with-asan = []
|
with-asan = []
|
||||||
|
wasm32-wasi-vfs = []
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = { version = "0.54", optional = true, default-features = false, features = ["runtime"] }
|
bindgen = { version = "0.54", optional = true, default-features = false, features = ["runtime"] }
|
||||||
|
@ -111,10 +111,12 @@ mod build_bundled {
|
|||||||
}
|
}
|
||||||
// Target wasm32-wasi can't compile the default VFS
|
// Target wasm32-wasi can't compile the default VFS
|
||||||
if env::var("TARGET") == Ok("wasm32-wasi".to_string()) {
|
if env::var("TARGET") == Ok("wasm32-wasi".to_string()) {
|
||||||
cfg.file("sqlite3/wasm32-wasi-vfs.c")
|
cfg.flag("-DSQLITE_OS_OTHER")
|
||||||
.flag("-DSQLITE_OS_OTHER")
|
|
||||||
// https://github.com/rust-lang/rust/issues/74393
|
// https://github.com/rust-lang/rust/issues/74393
|
||||||
.flag("-DLONGDOUBLE_TYPE=double");
|
.flag("-DLONGDOUBLE_TYPE=double");
|
||||||
|
if cfg!(feature = "wasm32-wasi-vfs") {
|
||||||
|
cfg.file("sqlite3/wasm32-wasi-vfs.c");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if cfg!(feature = "unlock_notify") {
|
if cfg!(feature = "unlock_notify") {
|
||||||
cfg.flag("-DSQLITE_ENABLE_UNLOCK_NOTIFY");
|
cfg.flag("-DSQLITE_ENABLE_UNLOCK_NOTIFY");
|
||||||
|
Loading…
Reference in New Issue
Block a user