Development
Build from the repository root. See the design notes for current progress and planned work.
Source folders
| Path | Contents |
|---|---|
apps/launcher | Desktop app |
apps/cli | swofty command |
packages/core | Mod management, profiles, launch setup and restore |
packages/formats | Game file readers and writers |
packages/sdk | Plugin SDK (MIT) |
native/ | In-game loader |
mods/swoftymod | Built-in mod |
templates/mod | Sample mod (MIT) |
tools/ | Python tools for game files |
re/ | Game research and signatures |
docs/ | This site |
Build and check
On NixOS, nix develop provides the development tools and libraries.
sh
cargo build
cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --all --check
cargo build -p swofty-launcherThe launcher is built separately from the default workspace members.
Test with game files
These tests only read your game files. They are skipped when F1_25_DIR is unset.
sh
F1_25_DIR="/path/to/F1 25" cargo test -p swofty-formatsTo compare with the Python tools, set F1_25_DIR in your shell, then run:
sh
python3 tools/gamedb.py roundtrip "$F1_25_DIR/game_package/gamedatabases/gamedatabases.2025.bin"
python3 tools/erpw.py rebuild "$F1_25_DIR/2025_asset_groups/ui_package/databases.erp" /tmp/databases.erpNative loader
sh
native/build.sh
native/test/run_wine_test.shThe build uses Zig to produce Windows DLLs in native/dist/. The Wine test uses a small test executable to check the loader and MOD SETTINGS menu entry.
Documentation
sh
pnpm install
pnpm docs:dev
pnpm docs:buildCommits
Use Conventional Commits. The commit hook checks Rust formatting and clippy.