Repository navigation
Contributing
TwilightMC is maintained by BlackCat and the TwilightMC contributors. The binding rules live in CONTRIBUTING.md; this page is the orientation.
- Open an issue for non-trivial features or breaking changes so the architecture can be discussed first.
- Fork the repository and branch from
mainwith a descriptive name (feat/asset-pipeline,fix/uuid-v3-generation). - Keep pull requests scoped to one feature or fix.
- By submitting a PR, commit or patch you accept the CLA in CONTRIBUTING.md §1.
Every contribution must pass the same gates CI runs:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceThe desktop frontend adds:
npm --prefix crates/twilight-ui/ui run check:locales
npm --prefix crates/twilight-ui/ui run buildZero warnings are tolerated. See Building from source for the full toolchain setup.
-
Pure idiomatic Rust. No Qt residue: no
QObject,QString,QList, signals/slots orQThread. UseString,Vec,HashMap,bytes::Bytes,tokioandtokio::sync::mpsc. -
Errors, not panics. Define domain errors with
thiserror; no.unwrap()/.expect()in production library code. -
Serde everywhere. Strict
struct/enumtypes for every JSON manifest. -
Submodule isolation.
upstream/is reference material only. Never compile, link or modify it; onlytwilight-horizonreads the upstream Horizon tree, read-only. -
No bundled Mojang assets. Download textures, audio, language files and
client.jarfrom Mojang's CDN at runtime. -
Offline accounts use the standard v3 UUID (
MD5("OfflinePlayer:" + username)) and--accessToken 0. Custom auth goes through-javaagent:authlib-injector.jar.
Automated coding agents (OpenClaw, NanoClaw, Cursor Agent, Devin, …) are allowed only for:
- bug fixes tied to an existing issue;
- security patches;
- tests that improve coverage.
They may not add dependencies, rewrite architecture across crates, or touch
upstream/ without prior human approval. Every agent commit and PR must link
the issue it addresses, keep the diff minimal, and end with the robot signature
on its own line:
🤖🤖🤖
Commits or PRs identified as agent-generated without that signature are rejected.
<type>(<scope>): <short description>
[optional body explaining WHAT and WHY]
[optional footer / agent signature]
Permitted types: feat, fix, test, refactor, docs, chore.
Examples:
feat(downloader): implement parallel sha1 verification
fix(manifest): correct rule evaluation on macOS arm64
docs(wiki): document the package repositories
- TODO.md tracks the milestone backlog.
- Issues labelled
good first issueare scoped for new contributors. - Documentation fixes are always welcome — including this wiki.
- Architecture — the crate map.
- Building from source — local toolchain and gates.
- Licensing — what your contribution is licensed under.
TwilightMC is free software under AGPL-3.0-or-later · Report a bug · Releases · Discord
Start here
Using it
Under the hood
Project