Skip to content

Commit

Permalink
Remove wasm-bindgen feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Jun 24, 2024
1 parent 5bb63ef commit bc59e32
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/bitwarden-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ uniffi = [
"dep:p256",
] # Uniffi bindings
secrets = [] # Secrets manager API
wasm-bindgen = ["chrono/wasmbind"]

[dependencies]
async-trait = ">=0.1.80, <0.2"
Expand Down
8 changes: 8 additions & 0 deletions crates/bitwarden-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,13 @@ wasm-bindgen-futures = "0.4.41"
[dev-dependencies]
wasm-bindgen-test = "0.3.41"

[target.'cfg(target_arch = "wasm32")'.dependencies]
chrono = { version = ">=0.4.26, <0.5", features = [
"clock",
"serde",
"std",
"wasmbind",
], default-features = false }

[lints]
workspace = true
4 changes: 2 additions & 2 deletions crates/bitwarden-wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ cd ../../

if [ "$1" != "-r" ]; then
# Dev
cargo build -p bitwarden -p bitwarden-wasm --target wasm32-unknown-unknown --features wasm-bindgen
cargo build -p bitwarden-wasm --target wasm32-unknown-unknown
wasm-bindgen --target bundler --out-dir languages/js/wasm ./target/wasm32-unknown-unknown/debug/bitwarden_wasm.wasm
wasm-bindgen --target nodejs --out-dir languages/js/wasm/node ./target/wasm32-unknown-unknown/debug/bitwarden_wasm.wasm
else
# Release
cargo build -p bitwarden -p bitwarden-wasm --target wasm32-unknown-unknown --features wasm-bindgen --release
cargo build -p bitwarden-wasm --target wasm32-unknown-unknown --release
wasm-bindgen --target bundler --out-dir languages/js/wasm ./target/wasm32-unknown-unknown/release/bitwarden_wasm.wasm
wasm-bindgen --target nodejs --out-dir languages/js/wasm/node ./target/wasm32-unknown-unknown/release/bitwarden_wasm.wasm
fi
Expand Down

0 comments on commit bc59e32

Please sign in to comment.