netgusto / rusty-cube

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rusty-cube

Canvas cube spinned by Rust via WASM.

Rust WASM toolchain

First, install a rust+wasm toolchain by following these instructions: https://rustwasm.github.io/book/game-of-life/setup.html

install and build

$ wasm-pack build --debug
$ cd pkg && npm link
$ cd ..
$ cd www && npm install
$ npm link cube
$ npm start
# now open http://127.0.0.1:8080 in a wasm-enabled browser

develop

First, install and build. Then:

# to build-watch rust, at the root of the project
shell_1 $> fswatch -o -r ./src|xargs -I {} wasm-pack build --debug

# in another shell, to build-watch js
# in dir www/
shell_2 $> npm start

About

License:Apache License 2.0


Languages

Language:Rust 55.3%Language:JavaScript 40.8%Language:HTML 3.9%