Criticalup is a toolchain manager for Ferrocene, similar to rustup.
Note
For normal usage and binary installation, please consult the CriticalUp Documentation.
Installation instructions for CriticalUp are included in each release as well as the documentation.
CriticalUp only requires a working Rust and C toolchain to build. Installation instructions for Rust typically include installing a C toolchain as well.
Criticalup uses a Cargo Virtual Workspace
To build a debug version of the development-targeting CriticalUp:
cargo build -p criticalup-devTo build a debug version of the production-targeting CriticalUp:
cargo build -p criticalupTo build a release version:
cargo build -p criticalup --releaseTo test CriticalUp from workspace root:
cargo test --timings --lockedTo test a CriticalUp specific package from workspace root:
cargo test -p criticalup-cli --timings --lockedTo cut a release:
git pullon themainbranch for latest changes.- Create and checkout a new release branch from
main, use the naming convention -release/vX.Y.Z. Where,X.Y.Zis the release version you are trying to release. - Update the following on the release branch
- crates/criticalup/Cargo.toml: Change
versiontoX.Y.Z. - crates/criticalup-cli/Cargo.toml: Change
versiontoX.Y.Z. - crates/criticalup-dev/Cargo.toml: Change
versiontoX.Y.Z. - crates/criticalup-cli/tests/snapshots/cli__root__version_flags.snap:
Update this test to match the correct version (
X.Y.Z). - CHANGELOG.md: Make
[Unreleased]the correct version ([X.Y.Z]). Add correct links metadata at the bottom.
- crates/criticalup/Cargo.toml: Change
- Run
cargo testandcargo clippy --tests --locked -- -Dwarningsto make sure there no failures. - Commit and push this branch and open a PR against
main, on GitHub. - Wait for approval(s) from reviewer(s).
- Once the PR is approved, comment
bors mergeto merge the PR. - After the PR is merged, checkout
mainbranch and update it (git pull) with the latest changes. - Create a tag
git tag 'vX.Y.Z'. - Push the tag
git push origin vX.Y.Z. This should trigger the release build in GitHub Actions and publish the release on its own. - Create a new PR updating the version to
X.Y.(Z+1)-prerelease.1, eg1.5.0would become1.5.1-prelease.1.
If the release build fails:
- Revert the changes from
release/vX.Y.Zand open a PR to be merged tomain. - Delete the tag from GitHub.
To use ferrocene as the default rustup toolchain, it is possible to create a rust-toolchain.toml file at the root:
> cat rust-toolchain.toml
[toolchain]
channel = "ferrocene"
components = ["cargo", "rustfmt", "clippy"]
profile = "default"
Add the file to .gitignore