Auto-loader and updater system for Garry's Mod integration modules.
This project provides a two-stage loading system for Garry's Mod:
- Auto Loader (
gmsv_gmod_integration_loader_*.dll) - Downloads and loads the latest integration modules - Auto Updater (
gmod_integration_*.dll) - Updates the actual Gmod integration addon files
- Loader Crate (
crates/loader/) - Downloads and delegates to real integration modules - Real Crate (
crates/real/) - Downloads and installs the actual Gmod integration addon
The project includes a multi-stage Dockerfile that cross-compiles for all supported platforms:
# Build the Docker image
docker build -t gmod-integration-builder .
# Create a temporary container
docker create --name tmp gmod-integration-builder
# Extract the built DLL files
docker cp tmp:/out ./release
# Clean up the temporary container
docker rm tmpThis will create a release/ directory containing all the compiled DLL files:
gmod_integration_linux.dll- Linux 32-bitgmod_integration_linux64.dll- Linux 64-bitgmod_integration_win32.dll- Windows 32-bitgmod_integration_win64.dll- Windows 64-bitgmsv_gmod_integration_loader_linux.dll- Linux 32-bit Loadergmsv_gmod_integration_loader_linux64.dll- Linux 64-bit Loadergmsv_gmod_integration_loader_win32.dll- Windows 32-bit Loadergmsv_gmod_integration_loader_win64.dll- Windows 64-bit Loader
Requirements:
- Rust toolchain (see
rust-toolchain.toml) - Cross-compilation targets
- MinGW for Windows builds
# Add required targets
rustup target add i686-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu
rustup target add i686-pc-windows-gnu
rustup target add x86_64-pc-windows-gnu
# Build for specific target
cargo build --release --target i686-unknown-linux-gnu- Download the appropriate DLL files for your platform from the releases page
- Place them in your
garrysmod/lua/bin/directory - Load the loader module first:
gmsv_gmod_integration_loader_*.dll
The project automatically builds and releases new versions when changes are made to:
crates/**- Source code changesCargo.*- Dependency changesrust-toolchain.toml- Rust toolchain changesDockerfile- Build configuration changes
Releases are tagged with timestamp and commit hash (e.g. v20250703-143052-a1b2c3d).
Use the provided deploy.sh script for local development:
./deploy.shThis will:
- Build both crates for the target platform
- Deploy to your development server
- Increment the version number
├── crates/
│ ├── loader/ # Auto-loader module
│ └── real/ # Auto-updater module
├── release/ # Pre-built DLL files
├── .github/workflows/ # CI/CD configuration
├── Dockerfile # Multi-platform build configuration
├── deploy.sh # Development deployment script
└── rust-toolchain.toml # Rust version specification
- Initial Load: Gmod loads
gmsv_gmod_integration_loader_*.dll - Update Check: Loader checks GitHub for latest releases
- Download: Downloads required DLL files for current platform
- Delegation: Loads and delegates to
gmod_integration_*.dll - Addon Update: Real module downloads and installs the latest addon files
- Integration: Full Gmod integration is now active
Both modules provide timestamped logging in the format:
| YYYY-MM-DD HH:MM:SS | Gmod Integration | Auto Loader: <message>
| YYYY-MM-DD HH:MM:SS | Gmod Integration | Auto Updater: <message>
[Add your license information here]