✓ Uses Rust 2018 edition
|new 0.2.60||Mar 26, 2020|
|0.2.58||Jan 7, 2020|
|0.2.56||Dec 20, 2019|
|0.2.55||Nov 19, 2019|
|0.1.1||Mar 6, 2018|
#248 in WebAssembly
203,931 downloads per month
Used in 2,154 crates (via wasm-bindgen)
Implementation of the
#[wasm_bindgen] attribute. See the
documentation for more information about what this macro does.
Testing of this macro is done through "ui tests" in the
of this crate. Each Rust file in this folder is compiled with the
crate, and the
*.stderr file sitting next to it is the asserted output of the
compiler. If the output matches, the test passes, and if the output doesn't
match the test fails. Note that it is also considered a failure if a test
actually compiles successfully.
To add a test:
- Write an invalid
#[wasm_bindgen]invocation, testing the error you're generating
cargo test -p ui-tests, the test will fail
- From within the
./update-all-references.sh. This should create a
my-awesome-test.stderrto make sure it looks ok
cargo test -p ui-testsand your tests should pass!
Testing here is a work in progress, see #601 for more information.