- Backend written in Elixir
- Phoenix Channels for communication between the frontend + backend
Messaging + Serialization
- WebSocket-based communication between the backend and the frontend using Phoenix channels
- Binary message serialization using Protcol Buffers.
- All messages are tagged with a UUID that corresponds to some entity.
- The "universe" can be an entity for general messages as well (UUID 0000-0000...?)
- Built with Rust and compiled into WebAssembly
- Uses the Phoenix channels JS client library as a wrapper to connect to the backend and relay data to the WebAssembly code that powers the game.
- Install Elixir with
brew install elixir
- Install all deps within
- Compile and start server with
- You'll need to install Rust in order to build the frontend. I suggest using Rustup.
rustup toolchain install nightlyto install the nightly toolchain
rustup default nightlyto make the nightly toolchain default.
rustup target add wasm32-unknown-unknown --toolchain nightlyto add the WebAssembly target.
cargo install wasm-bindgen-clito install the
wasm-bindgen-cliwhich is used to generate JS wrapper code and TypeScript definitions from WebAssembly files.