Skip to content

Latest commit

 

History

History
31 lines (29 loc) · 2.07 KB

README.md

File metadata and controls

31 lines (29 loc) · 2.07 KB

Instructions for installing Emscripten (based on Windows), assuming you are following directions here: http://asquera.de/blog/2017-04-10/the-path-to-rust-on-the-web/, to get Rustup and the right target installed.

Emscripten setup

Compiling Rust and building site

In this directory where you've cloned this repo:

  • In .cargo/config, most likely located at C:\Users\<username> place the following in the file:
[target.wasm32-unknown-emscripten]
linker = "C:\\Users\\<username>\\path\\to\\emscripten\\<emscripten version number>\\emcc.bat"
  • Run rustup target add wasm32-unknown-emscripten
  • I'm using Rust nightly, not sure you need it though, try stable out
  • Run cargo build --target=wasm32-unknown-emscripten --release
  • Run npm install
  • Run npm run gulp
  • Navigate to http://localhost:3006/ in SAFE browser
  • If navigating to localhost://p:3006 you'll observe an error in console that Fetch API failed due to localhost URL scheme not being supported. Looking into it...