mirror of
https://github.com/isar/rusqlite.git
synced 2025-11-21 07:19:24 +08:00
Merge pull request #1332 from etehtsea/wasi-example
Improve wasm32-wasi support
This commit is contained in:
@@ -246,11 +246,16 @@ mod build_bundled {
|
||||
if !win_target() {
|
||||
cfg.flag("-DHAVE_LOCALTIME_R");
|
||||
}
|
||||
// Target wasm32-wasi can't compile the default VFS
|
||||
if env::var("TARGET").map_or(false, |v| v == "wasm32-wasi") {
|
||||
cfg.flag("-DSQLITE_OS_OTHER")
|
||||
cfg.flag("-USQLITE_THREADSAFE")
|
||||
.flag("-DSQLITE_THREADSAFE=0")
|
||||
// https://github.com/rust-lang/rust/issues/74393
|
||||
.flag("-DLONGDOUBLE_TYPE=double");
|
||||
.flag("-DLONGDOUBLE_TYPE=double")
|
||||
.flag("-D_WASI_EMULATED_MMAN")
|
||||
.flag("-D_WASI_EMULATED_GETPID")
|
||||
.flag("-D_WASI_EMULATED_SIGNAL")
|
||||
.flag("-D_WASI_EMULATED_PROCESS_CLOCKS");
|
||||
|
||||
if cfg!(feature = "wasm32-wasi-vfs") {
|
||||
cfg.file("sqlite3/wasm32-wasi-vfs.c");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user