- Rust 92%
- Shell 3%
- JavaScript 2%
- Python 2%
- HTML <1%
- 1 more language <1%
protokill.sh #
a cyberpunk roguelike, written in Rust, deployed as WebAssembly, and integrated with ATProto.
Developing #
This repo is designed to be used with GitHub Codespaces. If you're doing something else, please check out .devcontainer/ for the list of tools and setup instructions.
Try running ./scripts/develop.sh to build and launch the game.
Default controls are documented in docs/CONTROLS.md.
tools/pk/ drives the real WASM build headlessly from the command line, for humans and agents: tools/pk/README.md.
Continuous integration #
scripts/ci.sh lists the checks. .tangled/workflows/ci.yml runs it.
Deploying #
This project is configured to deploy via AWS Amplify.
./scripts/deploy.sh builds a preview with the dev build stamp; ./scripts/deploy.sh --production (or PROTOKILL_PRODUCTION=1) is a production deploy and hides the stamp, keeping it in build-info.json.
The deploy also writes protokill_wasm_frontend_bg.wasm.br and .gz next to the wasm. Amplify uploads every artifact, so both are reachable at their own URLs, but serving one of them for the .wasm request needs a rewrite or custom-header rule in the Amplify console: amplify.yml only defines the build.
Tech stack #
Debugging info #
Debugging WASM file sizes #
Compile settings can dramatically change WASM file sizes. If you need to analyze them, try:
twiggy top target/wasm32-unknown-unknown/web/protokill_wasm_frontend.wasm | head -n 10
Suggested reading #
- [https://surma.dev/things/rust-to-webassembly/](Rust to WebAssembly the hard way)