Skip to content

Commit

Permalink
Another attempt at wasm (4)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jan 23, 2025
1 parent 48dc622 commit f03d31e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ _static/dist/cp-lib.js:

_static/dist/rust.js:
@mkdir -p _static/dist
@cd ../rust && wasm-pack build --target web --out-dir ../docs/_static/dist/
@cd ../rust && wasm-pack build --target web --out-dir ../docs/_static/dist/ -- --features bulk-memory

_static/dist/python.tar.gz:
@$(MAKE) -C ../python webpack $(MFLAGS)
Expand Down
4 changes: 3 additions & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ features = [ "std" ]
[dev-dependencies]
rstest = { version = "0.21.0", default-features = false }

[target.'cfg(any(target_arch="wasm32",target_arch="wasm64"))']
rustflags = ["-C", "target-feature=+bulk-memory"]

[target.'cfg(any(target_arch="wasm32",target_arch="wasm64"))'.dependencies]
js-sys = "0.3"
wasm-bindgen = { version = "0.2", default-features = false }
wasm-opt = false

[lib]
crate-type = ["cdylib"] # Necessary for WebAssembly builds
Expand Down

0 comments on commit f03d31e

Please sign in to comment.