From 828e51f848d31390632d1b19c760df404642e0c6 Mon Sep 17 00:00:00 2001 From: Spxg Date: Thu, 20 Feb 2025 21:56:07 +0800 Subject: [PATCH] No default features for sqlite-wasm-rs --- .github/workflows/ci.yml | 11 ++++++++++- diesel/Cargo.toml | 4 ++-- diesel_tests/Cargo.toml | 1 + examples/sqlite/wasm/Cargo.toml | 3 +-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48c1b0302d06..d92c3fd661e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -318,8 +318,17 @@ jobs: - name: Install wasm-pack run: cargo install wasm-pack + - name: Install emscripten toolchains + run: | + git clone https://github.com/emscripten-core/emsdk.git + cd emsdk + ./emsdk install latest + ./emsdk activate latest + - name: Test unit and integration tests - run: cargo xtask run-tests --wasm sqlite + run: | + source ./emsdk/emsdk_env.sh + cargo xtask run-tests --wasm sqlite sqlite_bundled: name: Check sqlite bundled + Sqlite with asan diff --git a/diesel/Cargo.toml b/diesel/Cargo.toml index 446e22ced262..0622a24a01e8 100644 --- a/diesel/Cargo.toml +++ b/diesel/Cargo.toml @@ -53,13 +53,13 @@ path = "../diesel_derives" libsqlite3-sys = { version = ">=0.17.2, <0.32.0", optional = true, features = ["bundled_bindings"] } [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] -# https://github.com/Spxg/sqlite-wasm-rs#why-provide-precompiled-library -sqlite-wasm-rs = { version = ">=0.3.0, <0.4.0", optional = true, default-features = false, features = ["precompiled"] } +sqlite-wasm-rs = { version = ">=0.3.0, <0.4.0", optional = true, default-features = false } [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dev-dependencies] # Something is dependent on it, we use feature to override it. getrandom = { version = "0.2", features = ["js"] } wasm-bindgen-test = "0.3.49" +sqlite-wasm-rs = { version = ">=0.3.0, <0.4.0", default-features = false, features = ["bundled"] } [dev-dependencies] cfg-if = "1" diff --git a/diesel_tests/Cargo.toml b/diesel_tests/Cargo.toml index 26faa61d884e..e77844d27473 100644 --- a/diesel_tests/Cargo.toml +++ b/diesel_tests/Cargo.toml @@ -32,6 +32,7 @@ diesel_test_helper = { path = "../diesel_test_helper" } # Something is dependent on it, so we use feature to override it. getrandom = { version = "0.2", features = ["js"] } wasm-bindgen-test = "0.3.49" +sqlite-wasm-rs = { version = ">=0.3.0, <0.4.0", default-features = false, features = ["bundled"] } [features] default = [] diff --git a/examples/sqlite/wasm/Cargo.toml b/examples/sqlite/wasm/Cargo.toml index 075afe7d9196..56272763c14e 100644 --- a/examples/sqlite/wasm/Cargo.toml +++ b/examples/sqlite/wasm/Cargo.toml @@ -13,8 +13,7 @@ wasm-bindgen = "0.2.99" wasm-bindgen-futures = "0.4.49" [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] -# https://github.com/Spxg/sqlite-wasm-rs#why-provide-precompiled-library -sqlite-wasm-rs = { version = ">=0.3.0, <0.4.0", default-features = false, features = ["precompiled"] } +sqlite-wasm-rs = { version = ">=0.3.0, <0.4.0", default-features = false, features = ["bundled"] } [lib] crate-type = ["cdylib"]