Skip to content
factorio-rs

factorio-rs

Rust SDK for Factorio's modding API - docs, live playground, and ecosystem crates.

factorio-rs

Language, CLI, recipes, and reference for writing Factorio mods in Rust.

Open factorio-rs

Playground

Live browser transpile preview: Rust in, Factorio mod tree out.

Open Playground

factorio-rs-gui

Ecosystem

Reactive GUI helpers (crates.io + Factorio mod portal library mod).

Open factorio-rs-gui

Typed Factorio APIs

Write a Factorio-oriented Rust subset. cargo check and rust-analyzer use generated stubs; the CLI emits a normal Lua mod.

In-game tests

Author #[test] simulations and run them with factorio-rs test inside Factorio (headless by default).

Cross-mod APIs

Export functions with #[factorio_rs::export] and depend on other mods like Cargo crates - see Share an API.

Safety lints

Transpile-time lints catch Rust patterns that type-check but nil-crash or miscompile in Lua.