Profiles
Profiles in Factorio.toml control transpile behaviour. They are not Cargo
[profile.dev] / --release profiles.
Under [profiles.<name>]:
| Key | Meaning |
|---|---|
debug_level |
Lua comment verbosity (0 = headers only; 1+ adds more inline comments) |
prune_dead_code |
Remove unreachable IR before codegen |
Defaults
Section titled “Defaults”| Profile name | Default debug_level |
Default prune_dead_code |
|---|---|---|
debug |
1 |
false |
anything else (including release) |
unset (no debug-comment mode) unless TOML sets it | true |
Init templates and examples usually set release to debug_level = 0 explicitly.
CLI defaults
Section titled “CLI defaults”| Command | Default --profile |
|---|---|
build, install |
debug |
package |
release |
Override with --profile <name> and/or --debug-level N.
What pruning keeps
Section titled “What pruning keeps”Reachability starts from:
#[factorio_rs::event]handlers- public functions and structs in settings/data stage modules (load-time entry points)