andrey-kudinov / snake-rust-game

Try to create a browser game made in Rust/WebAssembly and Javascript

Home Page:https://snake-rust.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snake-rust-game (How to run)

Rust & WebAssembly with JS (TS) - The Practical Guide

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

  1. Compile rust code into web-assembly -> wasm-pack build --target web

  2. Run the development server npm start

  3. Open the browser on localhost:8080

About

Try to create a browser game made in Rust/WebAssembly and Javascript

https://snake-rust.netlify.app/


Languages

Language:JavaScript 42.1%Language:Rust 28.6%Language:TypeScript 16.1%Language:HTML 13.2%