This document explains how to contribute to Rustsystem: the branch structure, development workflow, and how releases are versioned and documented.
Development flows through two long-lived branches (stage and main) and short-lived feature branches:
gitGraph
commit id: "main (stable)"
branch stage
checkout stage
commit id: "stage (testing)"
branch add-deletion-endpoint
checkout add-deletion-endpoint
commit id: "feature work"
commit id: "more work"
checkout stage
merge add-deletion-endpoint id: "PR: feature → stage"
commit id: "2.1.0-beta tag"
commit id: "bug fix"
commit id: "2.1.1-beta tag"
checkout main
merge stage id: "PR: stage → main (2.1.1 full release)"
| Branch | Purpose |
|---|---|
main |
Stable, production-ready code. Only updated when a beta is promoted to a full release. |
stage |
Integration and testing branch. Receives feature PRs; beta tags are created here. |
<issue-name> |
Short-lived branch named after the issue being worked on. Branched from and merged into stage. |
- Create a branch off
stagenamed after the issue or feature (e.g.add-deletion-endpoint,fix-sse-reconnect). - Develop and commit on your feature branch.
- Open a PR from
<issue-name>→stagewhen the work is ready for testing. - Test on
stage. Beta tags (x.y.z-beta) are created here. Fix bugs onstagedirectly or via follow-up PRs. - Open a PR from
stage→mainonce a beta passes testing.mainonly ever receives full releases — beta tags remain onstage.
flowchart LR
A["<issue-name>\n(feature branch)"] -->|PR| B["stage\n(testing, beta tags)"]
B -->|bugs found| B
B -->|beta passes PR| C["main\n(full releases only)"]
Versions follow MAJOR.MINOR.PATCH, optionally suffixed with -beta for pre-releases.
MAJOR and MINOR versions are milestone-based: each number corresponds to a defined project milestone. PATCH versions are used for incremental development updates made while working towards the next milestone.
| Component | When to increment |
|---|---|
| MAJOR | Reaching a top-level milestone that represents a new generation of the project — e.g. a complete rewrite, a fundamental protocol change, or a shift in overall project direction so significant that it warrants a new major milestone series. |
| MINOR | Reaching a planned minor milestone — a defined set of features, goals, or deliverables that has been completed. What constitutes a milestone should be agreed upon before development begins (tracked on github milestones). |
| PATCH | Development updates made while working towards the next milestone — bug fixes, partial feature progress, documentation changes, small visual tweaks, or any change that does not yet complete a milestone. |
Every release that increments MAJOR or MINOR must first be released as a -beta pre-release and pass testing before it is promoted to a full release.
The promotion process works as follows:
flowchart LR
A["x.y.0-beta\n(pre-release)"] --> B{Testing}
B -- bugs found --> C["x.y.1-beta\n(fix)"]
C --> D{Testing}
D -- bugs found --> E["x.y.2-beta\n(fix) ..."]
D -- passed --> F["x.y.1\n(full release)"]
E --> G{Testing}
G -- passed --> H["x.y.2\n(full release)"]
The full release tag is placed at the same commit as the accepted pre-release on stage, and that commit is then merged into main via PR. No code changes are made between the last -beta tag and the full release tag. Beta tags only ever exist on stage — main only receives full releases.
Example:
10.11.0-betais released onstage. Bugs are found and fixed in10.11.1-beta,10.11.2-beta,10.11.3-beta. Once10.11.3-betapasses testing, it is tagged10.11.3onstageand merged intomain.
PATCH releases do not require a -beta pre-release and may be released directly as a full version.
All release notes must follow this structure.
# Release Notes — v<version>
A short block (blockquote) immediately below the title containing:
- Date of release.
- Built upon — which version this release is built on top of.
- Status — either
pre-release(with a note on what remains before promotion) orstable.
Example:
> Release date: 2026-04-01
> Built on top of v2.0.3-beta.
> **Status: stable.**> Pre-release date: 2026-04-01
> Built on top of v2.0.0-beta.
> **Status: pre-release — requires stress testing before production use.**A prose summary of the release followed by a bullet point list of every problem addressed or change made. The summary should communicate:
- How large the release is (patch-level tweak, significant feature addition, major overhaul, etc.).
- The motivation — what prompted the changes.
The bullet list gives a reader a complete picture at a glance before they read the detail sections.
Example:
## Overview
v2.1.0-beta is a significant feature release ...
- New meeting deletion endpoint
- Vote state endpoints added
- Lock ordering corrected in READMEOne subsection per item from the overview bullet list. Each subsection:
- Explains the change in depth — what was changed, why, and what impact it has.
- Uses tables to compare before/after states, list endpoints, or summarise options where that aids clarity.
- Uses Mermaid diagrams to illustrate flows, architecture, or sequences where a diagram communicates more than prose.
- Is separated from the next section by a horizontal rule (
---).
Example structure:
## Changes
### New Meeting Deletion Endpoint
...explanation...
---
### Vote State Endpoints
...explanation, possibly with a table of endpoints...
---
### README: Lock Ordering Correction
...explanation...Use a table when comparing multiple items across consistent attributes — e.g. a list of endpoints and their roles, a before/after comparison, or a summary of test coverage areas.
Use a Mermaid diagram when the relationship between steps, services, or states is easier to understand visually than as prose. Preferred diagram types:
| Situation | Diagram type |
|---|---|
| Multi-step flows or processes | flowchart |
| Service-to-service communication | sequenceDiagram |
| State machines | stateDiagram-v2 |
| Version/branching timelines | gitGraph |
- Version number follows MAJOR.MINOR.PATCH rules above (MAJOR/MINOR = milestone reached, PATCH = development update).
- If MINOR or MAJOR changed, this is a
-betapre-release. - The PR from
stage→mainhas been reviewed and testing passed. - Preamble includes date, base version, and status.
- Overview contains a prose summary and a bullet list of all changes.
- Each bullet point has a corresponding Changes subsection.
- Tables or Mermaid diagrams are used where they add clarity.
- Each Changes subsection is separated by a horizontal rule.