Repository navigation
Support guest toolchain selection - #83
Open
simongdavies wants to merge 3 commits into
Open
simongdavies wants to merge 3 commits into
simongdavies wants to merge 3 commits into
Conversation
Select installed Cargo and Rust tools consistently for guest preparation and compilation without changing the host process environment or installing components. Document the API and cover newer-host/older-guest builds. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63d06f38-d356-4418-aa31-2473e0f87584 Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-platform toolchain switching needs human validation, with unresolved executable-selection and credential-exposure issues.
2 open issues
What changed in this PR
Adds explicit guest Rust toolchain selection for library callers, allowing host and guest builds to use different compilers.
Changes:
- Parses toolchain files and applies selected compiler executables.
- Requires preinstalled guest toolchains and Rust sources.
- Adds documentation, tests, and cross-platform CI coverage.
| File | Description |
|---|---|
| tests/toolchain_file.rs | Tests selection errors and cross-version builds. |
| src/toolchain.rs | Uses effective Cargo for preparation. |
| src/sysroot.rs | Uses selected tools and checks Rust sources. |
| src/lib.rs | Controls source installation during preparation. |
| src/command.rs | Adds the toolchain selection API. |
| src/cli.rs | Uses effective Cargo for configuration queries. |
| src/cargo_cmd.rs | Parses toolchain files and resolves executables. |
| README.md | Documents guest toolchain selection. |
| Cargo.toml | Adds TOML parsing dependency. |
| Cargo.lock | Locks new dependencies. |
| .github/workflows/ci.yml | Adds Linux and Windows toolchain-selection tests. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63d06f38-d356-4418-aa31-2473e0f87584 Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Use the same Cargo executable for preparation and the guest command, with explicit toolchain selection taking precedence over CARGO overrides. Keep inherited credentials out of printable command overrides while preserving environment inheritance and clearing behavior. Add regression tests for executable selection and credential-free debug and failure diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 63d06f38-d356-4418-aa31-2473e0f87584 Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
simongdavies
force-pushed
the
simongdavies-guest-toolchain-selection
branch
from
October 20, 2026 16:12
8f4696d to
ecd1f48
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request introduces support for selecting and using an explicit guest Rust toolchain (via a
rust-toolchain.tomlfile) when running cargo-hyperlight as a library, allowing the guest build to use a different toolchain than the host.