A Factorio mod integrated with Weights & Biases (W&B) for tracking game metrics and statistics.
mod/- Factorio mod filesrust_client/- Rust client application for W&B integrationMakefile- Build and run automation
- Factorio game installed
- Rust toolchain (cargo)
- W&B account and SDK
- Copy the environment template:
cp .env.template .env- Edit
.envand configure the following variables:
# W&B Core Path
# Path to the wandb binary for core functionality
_WANDB_CORE_PATH=/path/to/wandb/bin
# W&B Rust SDK Path (for local development)
# Path to your local wandb Rust SDK repository
WANDB_SDK_PATH=/path/to/wandb/experimental/rust-sdk
# Rust Logging Level (optional, uncomment to enable)
# Options: error, warn, info, debug, trace
# RUST_LOG=debugImportant:
_WANDB_CORE_PATHshould point to thebindirectory of your W&B installationWANDB_SDK_PATHshould point to the root of the wandb Rust SDK repository- Both paths must be absolute paths
The Rust client uses a template-based Cargo.toml that's generated from environment variables:
# Generate Cargo.toml and build the Rust client
make build-rust-client
# Or just generate the Cargo.toml
make setup-rust-clientThe setup-rust-client target will:
- Validate that
WANDB_SDK_PATHis set - Generate
rust_client/Cargo.tomlfrom the template - Substitute environment variables in the configuration
# Run with W&B tracking
make run-rust-client
# Run with debug logging
make run-rust-client-debug.env- Your local environment configuration (not committed to git).env.template- Template showing required environment variables (committed to git)rust_client/Cargo.toml.template- Template for Rust dependencies (committed to git)rust_client/Cargo.toml- Generated file with actual paths (not committed to git)
Make sure you've:
- Created a
.envfile from.env.template - Set
WANDB_SDK_PATHto your local wandb Rust SDK path - Used an absolute path (not relative)
Verify that WANDB_SDK_PATH points to a valid wandb Rust SDK repository with a Cargo.toml file.
On macOS:
brew install gettext
brew link --force gettextOn Ubuntu/Debian:
sudo apt-get install gettext