Repository navigation
build: pin Rust through Hermit rustup and rust-toolchain.toml #1871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| .rust-1.98.1.pkg | ||
| .rustup-1.29.2.pkg | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .rustup-1.29.2.pkg |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| # Contribution workflow | ||
|
|
||
| The repository pins just 1.58.0, Node.js 24.18.0, pnpm 11.8.0, Lefthook 2.2.2, | ||
| and Rust 1.98.1 | ||
| (including Cargo, rustfmt, and Clippy) with [Hermit](https://cashapp.github.io/hermit/). | ||
| and rustup with [Hermit](https://cashapp.github.io/hermit/). `rust-toolchain.toml` | ||
| pins Rust 1.98.1 (including Cargo, rustfmt, and Clippy), which rustup installs | ||
| under the machine-shared `~/.rustup`. | ||
| No global tool installation is required: `bin/hermit` bootstraps Hermit and tools | ||
| are downloaded on first use. Desktop development still requires the | ||
| [Tauri platform prerequisites](https://v2.tauri.app/start/prerequisites/). | ||
|
|
@@ -11,9 +12,18 @@ From the repository root: | |
|
|
||
| ```sh | ||
| source bin/activate-hermit # bash/zsh; fish: source bin/activate-hermit.fish | ||
| rustup toolchain install | ||
| just --list | ||
| ``` | ||
|
|
||
| Run `rustup toolchain install` after cloning and after `rust-toolchain.toml` | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional: the bootstrap install only covers new worktrees. Existing checkouts that pull this get an implicit install on the first proxy call, so an editor plus a terminal can still hit the concurrent-install failure described here. Reproduced: |
||
| changes, before an editor or parallel commands start the Rust proxies. rustup | ||
| does not serialize installs, so concurrent first use can leave the toolchain | ||
| missing a component's binaries while rustup reports it installed (for example, | ||
| `cargo clippy` fails although `rustup component add clippy` says it is up to | ||
| date). To repair it, reinstall the toolchain: | ||
| `rustup toolchain uninstall 1.98.1 && rustup toolchain install`. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: the hardcoded |
||
|
|
||
| Without activation, use `bin/just`, `bin/pnpm`, or `bin/cargo` from the root; | ||
| these proxies supply the pinned environment to child commands too. For example, | ||
| `bin/just web` needs no shell setup. With activation, commands also work from | ||
|
|
@@ -171,8 +181,9 @@ scripts/bootstrap-worktree.sh /absolute/path/to/source/checkout | |
| ``` | ||
|
|
||
| The idempotent script copies the source checkout's git-ignored `.env.local` | ||
| without overwriting an existing target, then uses the new worktree's Hermit proxy | ||
| to run `bin/pnpm install --frozen-lockfile`. It rejects checkouts from another | ||
| without overwriting an existing target, then uses the new worktree's Hermit | ||
| proxies to run `bin/rustup toolchain install` and | ||
| `bin/pnpm install --frozen-lockfile`. It rejects checkouts from another | ||
| repository. Keychain credentials and pnpm's package cache remain machine-shared; | ||
| do not copy private keys, `node_modules`, build output, `.npmrc`, or other ignored | ||
| files. Git hooks need no per-worktree step; see [Git hooks](#git-hooks). | ||
|
|
@@ -240,7 +251,7 @@ Buzz library are described in [Agents](agents.md#community-inventory). | |
|
|
||
| ## Running the app | ||
|
|
||
| Hermit pins just, Node.js 24, pnpm 11.8.0, and Rust in `bin/`; no global tool | ||
| Hermit pins just, Node.js 24, pnpm 11.8.0, and rustup in `bin/`; no global tool | ||
| installation is needed. From the repository root, activate the pinned environment: | ||
|
|
||
| ```sh | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [toolchain] | ||
| channel = "1.98.1" | ||
| profile = "minimal" | ||
| components = ["clippy", "rustfmt", "rust-analyzer"] | ||
|
matt2e marked this conversation as resolved.
|
||
Uh oh!
There was an error while loading. Please reload this page.