Guidelines
These are the conventions shared by the Eternaltwin repositories. Third-party games and applications integrating with Eternaltwin are expected to follow them too: they are what makes it possible to move between projects without relearning everything.
License
Code
All code in the Eternaltwin repositories should be licensed with the AGPL3 license:
- Full name:
GNU Affero General Public License v3.0 or later - Short name:
AGPL-3.0-or-later - SPDX link: https://spdx.org/licenses/AGPL-3.0-or-later.html
Assets
All other non-code assets should be licensed with the following Creative Commons 4.0 license:
- Full name:
Creative Commons Attribution Non Commercial Share Alike 4.0 International - Short name:
CC-BY-NC-SA-4.0 - SPDX link: https://spdx.org/licenses/CC-BY-NC-SA-4.0.html
Declaring the license
Declare the license in the package manifest, using the SPDX short name. Do not add a per-file license header: no source file in the main repository carries one, and a header that drifts from the manifest is worse than no header.
- Rust:
license = "AGPL-3.0-or-later"in[workspace.package], inherited by each crate withlicense.workspace = true. - Node: a
licensesarray withtypeset toAGPL-3.0-or-laterandurlset to the SPDX link. - PHP:
"license": "AGPL-3.0-or-later"incomposer.json. - Ruby:
spec.license = 'AGPL-3.0-or-later'in the gemspec.
Also ship the full license text as LICENSE.md at the root of the repository.
Publishing your source
The AGPL requires you to publish the source of what you deploy. Eternaltwin tolerates a delay of up to one year after deployment for game projects, so that players cannot gain an unfair in-game advantage by reading the source of a game that is still running. Submit a support ticket if you want such a delay for your own project; it is granted, not assumed.
Other
If you need another license, open an issue.
Configuration
Your application must have a mechanism to load configuration from the environment variable or a configuration file. See Application configuration.
Code style
Use an .editorconfig file at the root of the repository, and match the
settings used by Eternaltwin:
- UTF-8, LF line endings, final newline, no trailing whitespace
- Indent with 2 spaces
- Maximum line length: 120
Use the standard formatter and linter of your language, and run them in CI.
Eternaltwin uses cargo fmt and cargo clippy for Rust (rustfmt.toml sets
max_width = 120 and tab_spaces = 2, matching the .editorconfig) and
ESLint for TypeScript.
Changelog
Keep a CHANGELOG.md at the root of the repository. Unreleased entries go
under a # Next heading, which is renamed to the version and release date when
you publish, for example # 0.16.4 (2025-02-17).
Tag each entry with its kind, so a reader can tell at a glance what a release asks of them:
**[Breaking change]****[Feature]****[Fix]****[Internal]**
Write entries for the people who depend on your project: say what changed and what they have to do about it, not which commit did it.
Language
Write code, comments, documentation and commit messages in English. Only player-facing content is translated.
Repository
Eternaltwin projects are hosted on GitLab under
https://gitlab.com/eternaltwin. The main repository is
https://gitlab.com/eternaltwin/eternaltwin, whose default branch is main.
See Contributing if you want to work on Eternaltwin itself.