cargo-screeps-0.0.3 is not a library.
Visit the last successful build:
cargo-screeps-0.0.0
cargo-screeps
Build tool for deploying Rust WASM code to Screeps game servers.
Best used with screeps-game-api
.
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:
--build
:
- during build stage, shell out to https://github.com/koute/cargo-web for actual building the rust code.
- strip off header / surrounding function
cargo-web
generates for a generic JS file, since we know we're deploying to node - append call to
__initialize
function which cargo-web generates, usingrequire('compiled')
to get the WASM bytes - create
target/main.js
containing processed JS and copy WASM file totarget/compiled.wasm
--upload
:
- run build.
- read
target/*.js
andtarget/*.wasm
, keeping track of filenames - read
screeps.toml
for upload options - upload all read files to server, using filenames as the filenames on the server.
--check
:
- run
cargo web --check --target=wasm32-unknown-unknown