Typed bindings to the Screeps in-game API for WASM Rust AIs.
Also the homepage for tools relating to writing [Screeps] AIs in Rust.
screeps-game-api
is a Rust binding to the JavaScript APIs for programs compiled to WASM using
[wasm-pack
].
Also in this organization is cargo screeps
, a binary program which wraps
wasm-pack
and lets one directly upload Rust WASM code to Screeps servers.
These two tools go together well, but do not depend on eachother. cargo-screeps
can compile and
upload any screeps WASM project buildable with wasm-bindgen
's wasm-pack
, and screeps-game-api
is
usable in any project built with wasm-pack
.
Writing Screeps code in Rust can be nice, but it can also be annoying. If you have tips, tricks, or other things you'd like to share, make an issue! We need to write more documentation, and if we have enough ideas, we can start an mdbook for this repository.
If you need help or want to share feedback, feel free to open an
issue
or come say "Hi!" on the official Screeps Discord in the #rust
channel!
Here's a quickstart for what you need to get going. More documentation will be made in the future.
```sh
cargo install cargo-screeps
git clone https://github.com/rustyscreeps/screeps-starter-rust.git cd screeps-starter-rust
cp example-screeps.toml screeps.toml nano screeps.toml
cargo screeps --help
cargo screeps build
cargo screeps deploy -m upload
cargo screeps deploy ```