Skip to content

Hacking on GDPatch

GDPatch is written in the Rust programming language. The specific Rust nightly toolchain will be automatically installed from the rust-toolchain.toml.

When working on GDPatch, you likely want to build gdpatch-loader:

Terminal window
cargo build -p gdpatch-loader

Copy the output file into your game install like a normal installation.

If you’re building on Linux for use under Wine, you can use the x86_64-pc-windows-gnu target.

GDPatch is split into multiple crates:

  • gdpatch contains mod loading, the patcher API, configs, and other mod loader related things.
  • gdpatch-loader is responsible for loading GDPatch into the game process. This is built as a dynamic (shared) library.
  • gdpatch-godot contains Godot-specific parsers and other goodies.
  • filesilly contains our filesystem detours for making the game read our virtual packs.

Please make sure your commits pass rustfmt and Clippy:

Terminal window
cargo fmt
cargo clippy --fix
  • Run cargo fmt and cargo clippy first!
  • Edit the crate version in Cargo.toml, and build to make sure Cargo.lock gets updated as well.
  • Commit a version bump: git commit -s -m "vX.Y.Z", and git push.
  • Wait for CI to pass. If you don’t do this you will make Jules cry. You wouldn’t want to make Jules cry, would you Katie?
  • Create an annotated tag: git tag -s -a vX.Y.Z, and write a tag description in Markdown like so:
    • The first line should always be the version number!
    • If you’re a jj freak like Jules, don’t forget to jj new main before and jj git import after.
vX.Y.Z
- Added some stuff
- Did some other things
- Achieved world domination
  • git push --tags
  • Wait through a very tense 5 minutes and hope you didn’t fuck something up.
  • Profit(?)