Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lord/wargo

Easy Rust to WebAssembly
https://github.com/lord/wargo

cargo rust webassembly webdriver

Last synced: about 2 months ago
JSON representation

Easy Rust to WebAssembly

Awesome Lists containing this project

README

        


wargo: Easy Rust to Webassembly


Build Status
NPM Version

`wargo` makes it easy to compile Rust into WebAssembly on macOS or Linux. To install:

npm install -g wargo

To use, just `wargo build` instead of `cargo build`. We'll automatically make sure the Emscripten compiler is installed and configured before each run.

cargo new --bin meow
cd meow
wargo build

Want to run your tests in the browser? No problem — we've got `wargo test`. Just run Selenium locally, set some environment variables, and you're ready to go.

export WEBDRIVER_HOST="localhost"
export WEBDRIVER_PORT="5555"
wargo test

Don't want to install Selenium? `wargo` can also run tests using [Sauce Connect](https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy).

export SAUCE_USERNAME="your username"
export SAUCE_ACCESS_KEY="blah-1234-1234-1234"
export WEBDRIVER_CAPABILITIES='{"browserName": "chrome"}'
wargo test

For more information, check out [the tutorial blog post](https://lord.io/blog/2017/wargo).