Releasing a new compiler version is handled by the scripts under scripts/. There is no need to do anything by hand, the whole release process is divided in three steps: deploy the Rust code documentation, generate the release changelog, and tag the release. Each step has its own script, and the entry point that runs them all in order is deploy-version.
Every script comes in four flavors so you can run it on any platform:
.shfor bash (Linux, macOS, WSL)..ps1for PowerShell (Windows)..fishfor the fish shell..batfor the classic Windows command prompt.
Note
These scripts must be run from inside a git clone of the repository, and they expect a remote named origin. They also prompt for input (tag names, push confirmation, and so on), so they are meant to be run interactively.
The release scripts need a few tools that are not part of the compiler itself:
git-cliffis used to generate the changelog from the git history. It is configured through thecliff.tomlfile at the root of the project.sccacheis used as the rustc wrapper for builds.panic-analyzeris a helper to analyze panics.
You can install the three of them with the cargo-dependencies script:
bash scripts/cargo-dependencies.shThere are also .ps1, .fish and .bat versions of that script.
The code documentation step also relies on the cargo docs alias defined in .cargo/config.toml, which builds rustdoc documentation for thrustc workspace crates while excluding the vendored LLVM crates.
The whole process is orchestrated by deploy-version, which runs the three steps in order:
=== Step 1/3: Deploying documentation ===
=== Step 2/3: Generating release changelog ===
=== Step 3/3: Tagging release ===Run it with the flavor of your shell:
bash scripts/deploy-version.shpowershell -ExecutionPolicy Bypass -File scripts/deploy-version.ps1fish scripts/deploy-version.fishscripts\deploy-version.batIf any of the steps fails, the pipeline stops there. Each step can also be run on its own if you only want part of the release.
Script: deploy-code-docs (.sh, .ps1, .fish, .bat).
This step publishes the Rust code documentation to GitHub Pages, under the gh-pages branch.
What it does:
- Checks if the
gh-pagesbranch exists on theoriginremote. If it does not, it creates it as an orphan branch with an initial empty commit and pushes it. - Builds the documentation with
cargo clean --docfollowed bycargo docs. - Copies the generated
target/docfolder to a temporary directory and adds anindex.htmlthat redirects to the main crate page (thrustc/index.html). - Uses a git worktree of the
gh-pagesbranch to replace its contents with the fresh documentation. - Commits the changes with a message that includes the current date, and pushes them to
origin. If there are no documentation changes, nothing is pushed.
Note
This step does not require any tag, you can run it alone to update the online documentation without doing a release.
Script: release-changelog (.sh, .ps1, .fish, .bat).
This step creates the changelog for the new version and tags it. It needs git-cliff installed and works from the root of the project.
Important
Both tags are required and are read from the terminal. The previous tag must exist, otherwise the script exits with an error. The new tag should follow the existing naming convention used in the project (for example thrustc-x86_64-linux-ubuntu-v0.1.5).
Script: tag-manager (.sh, .ps1, .fish, .bat).
This step creates the git tag for the release and optionally pushes it to the remote.
Once deploy-version finishes, the release is tagged and the documentation is live. You can:
- Check the generated changelog under
changelogs/<tag>/README.md. - Create the GitHub release pointing at the new tag, using the changelog as the release notes.
- Update the prebuilt binaries if the project publishes them to GitHub releases.
The GitHub Releases page provides four compiler and language server binary variants:
thrustc: The standard compiler executable, compiled with symbols and debug information for investigating production bugs. It has a larger file size.thrustc-stripped: The compiler executable without symbols or debug information, resulting in a much smaller file size.thrustc_lsp: The language server executable used by editors such as Visual Studio Code.thrustc_lsp-stripped: The language server executable without symbols or debug information.

