Skip to content

richardanaya/rust-roguelike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

This is a simple experiment to show how to make a simple roguelike interface using Rust and Web Assembly. There's not much to it.

https://richardanaya.github.io/rust-roguelike/index.html

Interesting detail: Safe Rust doesn't allow mutable static globals. So you have to create a global mutex that holds a mutable value. That way all your library entrypoint functions sharing that global data are thread safe. Turns out there is a cargo package lazy_static that makes this easy.

Feel free to leave an issue if you see a more idiomatic way of doing something.

How to build

curl -s https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain=nightly
make

About

A simple rust roguelike experiment using web assembly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published