Installation
The command-line tool is published as factorio-rs-cli. Installing it
provides the factorio-rs binary:
cargo install factorio-rs-clifactorio-rs --helpSDK dependency
Section titled “SDK dependency”In your mod’s Cargo.toml:
[dependencies]factorio-rs = "0.3.2"Optional features:
# Type-check `tracing::info!` etc.; CLI lowers them to colored game.printfactorio-rs = { version = "0.3.2", features = ["tracing"] }
# Type-check serde / serde_json; CLI lowers to helpers.table_to_json / string.packfactorio-rs = { version = "0.3.2", features = ["serde"] }
# Bothfactorio-rs = { version = "0.3.2", features = ["tracing", "serde"] }See Tracing and Serde / JSON for details.
factorio-rs init scaffolds a project with this pin, edition = "2024", and
rust-version = "1.88" (edition 2024; let-chains in if / while require 1.88+).
Factorio (optional)
Section titled “Factorio (optional)”You only need a Factorio install for:
factorio-rs install/sync- copies or symlinksdist/into the mods directoryfactorio-rs open/install --open- launches the gamefactorio-rs test- runs in-game#[test]simulations
| Purpose | Resolution |
|---|---|
| Mods directory | FACTORIO_MODS_DIR, else ~/.factorio/mods |
| Game binary | FACTORIO_PATH, common Steam paths, factorio on PATH, or Steam protocol |
On Linux, binary launches prefer steam-run when it is available so Steam
runtime libraries are present.
Community
Section titled “Community”Questions that aren’t bugs: Discord. See also CONTRIBUTING.md.