Expand description
Typed bindings to the Screeps in-game API for WASM Rust AIs.
Cargo Features
sim
Enables special-case handling of the unique room name present in the
simulator - must be enabled to build code that is compatible with that
environment. If this is enabled, the top-left valid room coordinate has the
name sim, otherwise it’s named W127N127.
generate-pixel
Enables the function to generate pixels, which is only present on the Screeps: World official servers.
inter-shard-memory
Enables interacting with IntershardMemory, which is not present in most
private server environments.
score
Enables the score resource and entities, introduced for Screeps Seasonal’s first season.
symbols
Enables the symbol resources and entities, introduced for Screeps Seasonal’s second season.
thorium
Enables the thorium resource and reactor object, introduced for Screeps Seasonal’s fifth season.
unsafe-return-conversion
Enables return code conversion from game functions that presumes all return code values are in the expected ranges skipping checks, and risks undefined behavior if they are not.
mmo
Enables the generate-pixel and inter-shard-memory features, which are
present on the Screeps: World official servers but not on private servers.
seasonal-season-1
Enables the score feature, a mechanic introduced for Screeps Seasonal’s
first season, as well as enabling constants relevant to season 1.
seasonal-season-2
Enables the symbols feature, a mechanic introduced for Screeps Seasonal’s
second season, as well as enabling constants relevant to season 2.
seasonal-season-5
Enables the thorium feature, a mechanic introduced for Screeps Seasonal’s
fifth season, as well as enabling constants relevant to season 5.
Re-exports
pub use crate::constants::*;pub use crate::enums::*;pub use crate::js_collections::*;pub use crate::local::*;pub use crate::objects::*;pub use crate::traits::*;
Modules
- Utility functions for visuals that the game API exposes on the
consoleobject. - Constants, most copied from the game constants.
- Enums using
enum_dispatchfor generic wrappers around object types with shared traits. - The main interface to objects in the Screeps game world.
- inter_shard_memory
inter-shard-memoryInterface for Screeps inter-shard memory, allowing communication between instances of your code running on different shards. - Typed JavaScript collection wrappers.
- Pure-data structures relating to Screeps.
- Interface with Screeps’
Memoryglobal variable - Screeps object wrappers.
- Manually accessing the
PathFinderAPI - Traits which implement base functionalities for Screeps types.
- Interface for Screeps
RawMemoryglobal object. - Traits associated with how specific game objects can be used.