Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.64 KB

CONTRIBUTING.md

File metadata and controls

58 lines (39 loc) · 1.64 KB

Contribution Guide

Setup your local development environment

Add the wasm target

rustup target add wasm32-unknown-unknown

Build

cargo build --target wasm32-unknown-unknown

Examples

TODO: Add more info

stdweb

In order to run the examples in ./yew-stdweb, you may wish to install cargo-web:

cargo install cargo-web

Test

Web Tests

First, ensure that wasm-bindgen-cli is installed. Instructions

Additionally a webdriver must be installed locally and configured to be on the PATH. Currently supports geckodriver, chromedriver, and safaridriver, although more driver support may be added! You can download these at:

Macro Tests

When adding or updating tests, please make sure you have updated the appropriate stderr file, which you can find here for the html! macro. These files ensure that macro compilation errors are correct and easy to understand.

To update or generate a new stderr file you can run TRYBUILD=overwrite cargo test --test macro_test or TRYBUILD=overwrite cargo test --test derive_props_test from the yew-macro directory.

Running Tests
./ci/run_tests.sh

or

cargo test --target wasm32-unknown-unknown --features wasm_test