A simple rust roguelike experiment using web assembly
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
roguelike
.gitignore
Makefile
README.md
index.html
roguelike.wasm

README.md

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