Crates.io | deterministic-bloom-wasm |
lib.rs | deterministic-bloom-wasm |
version | 0.1.0 |
source | src |
created_at | 2023-08-21 18:12:32.928721 |
updated_at | 2023-08-21 18:12:32.928721 |
description | Wasm bindings for the deterministic-bloom crate. |
homepage | |
repository | https://github.com/wnfs-wg/deterministic-bloom/tree/main/deterministic-bloom-wasm |
max_upload_size | |
id | 950284 |
size | 25,680 |
Description.
We'll use wasm-pack
for building, testing, and publishing
our Wasm project.
The wasm-pack build
command will compile the code in this directory into
Wasm and generate a pkg
folder by default, containing the Wasm binary, a
Javascript-wrapper file, the deterministic-bloom-wasm README (and version), and a
package.json
file.
Targetting node:
wasm-pack build --target nodejs
Targetting browswers:
wasm-pack build --target web
Targetting bundlers like webpack:
wasm-pack build --target bundler
For running tests in the current directory, use one of these commands:
wasm-pack test --node
wasm-pack test --headless --firefox --chrome --safari
Note: Make sure you have the appropriate browser installed when running locally.
Once you've built the package, which lives under
pkg
by default (or a sub-directory of your choosing), you can pack and
publish it to npm via (given credentials):
wasm-pack publish
This project is licensed under the Apache License 2.0, or http://www.apache.org/licenses/LICENSE-2.0.