Skip to content

Installation

The command-line tool is published as factorio-rs-cli. Installing it provides the factorio-rs binary:

Terminal window
cargo install factorio-rs-cli
factorio-rs --help

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.print
factorio-rs = { version = "0.3.2", features = ["tracing"] }
# Type-check serde / serde_json; CLI lowers to helpers.table_to_json / string.pack
factorio-rs = { version = "0.3.2", features = ["serde"] }
# Both
factorio-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+).

You only need a Factorio install for:

  • factorio-rs install / sync - copies or symlinks dist/ into the mods directory
  • factorio-rs open / install --open - launches the game
  • factorio-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.

Questions that aren’t bugs: Discord. See also CONTRIBUTING.md.