Build tool for deploying Rust WASM code to Screeps game servers.
Best used with
This implements type-safe WASM bindings to the Screeps in-game API.
This is not fully tested, but feel free to use! Issues are welcome.
cargo-screeps has three build options:
- during build stage, shell out to https://github.com/koute/cargo-web for actual building the rust code.
- strip off header / surrounding function
cargo-webgenerates for a generic JS file, since we know we're deploying to node
- append call to
__initializefunction which cargo-web generates, using
require('compiled')to get the WASM bytes
target/main.jscontaining processed JS and copy WASM file to
- run build.
target/*.wasm, keeping track of filenames
screeps.tomlfor upload options
- upload all read files to server, using filenames as the filenames on the server.
cargo web --check --target=wasm32-unknown-unknown