https://github.com/netgusto/rusty-cube
https://github.com/netgusto/rusty-cube
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/netgusto/rusty-cube
- Owner: netgusto
- License: apache-2.0
- Created: 2018-12-14T10:10:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-06T12:30:29.000Z (about 7 years ago)
- Last Synced: 2025-01-29T02:45:12.008Z (12 months ago)
- Language: Rust
- Size: 63.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE_APACHE
Awesome Lists containing this project
README
# 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
```bash
$ 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:
```bash
# 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
```