You might have heard of a game called Nidhogg. The aim of this project is to provide a similar game accessible through the web.
The game is written in the programming language Rust. On the frontend we use Web Assembly so we can also use Rust on the frontend.
For documentation and overview purposes we have a Wiki.
If you have any questions or just want to contribute, we also have a discord server.
This is a simple recipe on how to get ratatosk
working locally. Further details can be
found in Wiki.
rustup
and the Rust toolchainbinaryen
(at least version 89,emscripten
is currently not used)python3
for the exemplary web server.cargo-make
for all build scripts.wabt
to introspect compiled wasm code.pkg-config
to find additional libraries.libopenssl
Optionally, all dependencies can be obtained with Nix by running
nix-shell
in the project's root.
First of all, you need to install the nightly
toolchain using rustup:
rustup install nightly-2020-02-28
rustup default nightly-2020-02-28
rustup target add wasm32-unknown-unknown # for the frontend part
cargo install cargo-make
Please note that we explicitly pin the nightly channel to a certain date to ensure that each developer uses the same toolchain which helps to reproduce compiler issues on multiple setups.
Now you can build the project with cargo
:
cargo make all
The following scripts can be used to start test servers
cargo make serve-frontend # for the wasm/frontend setup
cargo make serve-backend # for the backend/game_server
For development purposes it might be helpful to activate the watch
-profile in the
build-system:
cargo make serve-backend -p watch