Development & Contributing
Thank you for contributing to Universal Game Launcher! This guide details the toolchain, quality gate, coding conventions, and pull request workflows.
🧰 Toolchain
- Rust (stable toolchain) and Cargo
- Node.js 18+ and npm
- Platform Tauri system dependencies (WebView2 on Windows, WebKitGTK on Linux)
- Microsoft Visual C++ 2015–2022 Redistributable (x64) (Windows)
🚦 Quality Gate
Before opening a pull request, all automated checks must pass with zero errors and zero warnings:
# 1. Typecheck & Svelte diagnostics (must report 0 errors, 0 warnings)
npm run check
# 2. Rust check & unit test suite
cargo check --manifest-path src-tauri/Cargo.toml
cargo test --manifest-path src-tauri/Cargo.toml
# 3. Production static asset build
npm run build
Build Order Matters: The Tauri desktop binary embeds the compiled SvelteKit frontend. On a fresh clone, always run
npm install && npm run buildbefore running a barecargo check. The npm scripts (npm run tauri:dev,npm run tauri:build) orchestrate this ordering automatically.
🧩 Authoring Plugins & Modules
When implementing or improving a platform integration or metadata provider:
- Dedicated Files Only: Every plugin must live in its own dedicated file under
src/lib/plugins/platforms/<id>.tsorsrc/lib/plugins/metadata/<id>.ts. Never combine multiple providers into monolithic files. - Implement
UniversalPlugin: Implement theUniversalPlugininterface fromsrc/lib/plugins/framework.ts. - Integrate Full Client Features: Platform plugins should implement all available client capabilities:
getLaunchSpec: Protocol URIs and CLI arguments.getInstallUri/getUninstallUri: Storefront client install/uninstall protocols.getFriendsListUri: Direct client social roster links.getAchievementsUri: Client achievements view links.getDefaultKnownFolders: Default installation search directories.
- Decoupled Settings: If your plugin accepts user configuration or API keys, export a
getSettingsSchema()defining typed fields (text,password,boolean,select,path) and implementtestConnection()for live verification. - Register Your Plugin: Add your exported plugin to
PLATFORM_PLUGINSorMETADATA_PLUGINSinsrc/lib/plugins/index.ts.
🧾 Conventions
- Code Formatting: Ensure Rust code adheres to
cargo fmtand TypeScript adheres to Prettier. - Strict Typing: All frontend code must use TypeScript with strict null checks. Avoid
anywhere typed interfaces can be declared. - Air-Gapped Invariant: Built-in plugins must never require external downloaders or runtime code generation. All core logic runs offline.
- Non-Invasive Invariant: Never write directly to external storefront proprietary databases or cloud sync manifests (e.g.
shortcuts.vdf). - Secrets & Credentials: Never commit personal API keys, tokens, or local absolute paths to the repository.
🔢 Versioning
Universal Game Launcher follows Semantic Versioning (SemVer). Version bumps must update all three configuration manifests in lockstep:
package.jsonsrc-tauri/tauri.conf.jsonsrc-tauri/Cargo.toml
✍️ Commit Message Guidelines
Use clear, imperative commit subjects:
feat(plugins): add Rockstar Games platform integration
fix(storage): resolve volume calculation on secondary APFS drive
docs(wiki): update in-app modular plugin development guide
🔐 Security & Vulnerability Reporting
- Bugs & Feature Requests: Open an issue on the GitHub Issue Tracker.
- Security Vulnerabilities: Report security issues privately per the instructions in SECURITY.md.