Skip to content

Commit

Permalink
No default features for sqlite-wasm-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Spxg committed Feb 20, 2025
1 parent d47fa01 commit bb8f2e7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions diesel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions diesel_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
3 changes: 1 addition & 2 deletions examples/sqlite/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit bb8f2e7

Please sign in to comment.