Skip to content

martinhalford/snakegame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snakegame

A demo snake game developed in Rust.

Play demo snake game online at: https://snake.halford.it

The snake game rust app runs in the browser and interacts with the user via a simple HTML/Typescript interface.

The JS/TS interface calls functions defined within the Rust app, compiled as WASM, using WASM Bindgen.

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

Note: This is a modified fork of an existing repo by Filip Jerga - https://github.com/Jerga99/snake-rust-game

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published