mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-17 15:01:23 +00:00
1.4 KiB
1.4 KiB
Contributing to wasm-bindgen
This section contains instructions on how to get this project up and running for development.
Prerequisites
-
Rust Nightly. Install Rust. Once Rust is installed, run
rustup default nightly rustup target add wasm32-unknown-unknown
- The tests for this project use Node. Make sure you have node >= 10 installed, as that is when WebAssembly support was introduced. Install Node.
-
The tests for this project also use
yarn
, a package manager for Node. To installyarn
, run:npm install -g yarn
or follow other platform-specific instructions here.
Once
yarn
is installed, run it in the top level directory:yarn
Running Tests
Finally, you can run the tests with cargo
:
cargo test
Headless Browser Tests
Some tests are configured to run in a headless Firefox instance. To run these
tests, you must have Firefox installed. If you have Firefox installed in a
non-default, custom location you can set the WASM_BINDGEN_FIREFOX_BIN_PATH
environment variable to the path to your firefox-bin
.
For example:
WASM_BINDGEN_FIREFOX_BIN_PATH=/home/fitzgen/firefox/firefox-bin cargo test