https://github.com/jerga99/snake-rust-game
Course on how to create a game in Rust
https://github.com/jerga99/snake-rust-game
rust wasm webassembly
Last synced: about 1 year ago
JSON representation
Course on how to create a game in Rust
- Host: GitHub
- URL: https://github.com/jerga99/snake-rust-game
- Owner: Jerga99
- Created: 2021-11-29T12:30:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-06T20:31:48.000Z (about 4 years ago)
- Last Synced: 2025-03-24T07:26:44.495Z (over 1 year ago)
- Topics: rust, wasm, webassembly
- Language: JavaScript
- Homepage: https://www.udemy.com/course/rust-webassembly-with-js-ts-the-practical-guide/?referralCode=B8BF2207B45019CC1B3D
- Size: 352 KB
- Stars: 42
- Watchers: 4
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# snake-rust-game (How to run)
[Rust & WebAssembly with JS (TS) - The Practical Guide
](https://www.udemy.com/course/rust-webassembly-with-js-ts-the-practical-guide/?referralCode=B8BF2207B45019CC1B3D)
### Dependencies
1. Install rustup -> https://doc.rust-lang.org/book/ch01-01-installation.html
2. Install "wasm-pack" -> `cargo install wasm-pack`
3. Install npm dependencies -> `npm install` (must have Node JS) -> https://nodejs.org/)
### Compilation
Compile the rust code every time the changes are made in `src/lib.rs`
4. Compile rust code into web-assembly -> `wasm-pack build --target web`
5. Run the development server
`npm start`
6. Open the browser on `localhost:8080`