zisk/sp1: make guest crates standalone workspace roots - #520
Merged
Conversation
The zkVM guest crates (zisk/guest, zisk/agg-guest, sp1/guest) are compiled out-of-tree for the riscv target by the zkVM build scripts, never as part of the host workspace. They carried no `[workspace]` of their own and relied purely on the ancestor manifests' `exclude` lists to be treated as standalone. That breaks under a NESTED checkout. The benchmark base-run (bench-pr.yml) checks the base repo out under `base/` INSIDE the PR checkout, so the base guest lives at `base/zisk/guest`. The root manifest's `exclude = ["zisk", "sp1"]` is relative, so it covers `./zisk` but not `./base/zisk`; cargo's workspace search for the base guest walks up past `base/zisk` (which excludes it) to the outer PR-checkout root, which neither lists nor excludes it, and `ziskbuild`'s `cargo metadata` call panics with "current package believes it's in a workspace when it's not". The base-side `zisk-host` build then fails and the main column of the bench comparison comes up empty (seen on the zisk-InitStd-execute base run). Give each guest its own empty `[workspace]` table so cargo pins its workspace to the crate itself and never walks up to an ancestor, regardless of nesting — exactly what the cargo error recommends. Verified by reproducing the nested layout: without the table cargo emits the exact error; with it, resolution no longer reaches the outer workspace. The guests use no `workspace = true` inheritance, so a standalone root changes nothing else.
samuelburnham
force-pushed
the
sb/zisk-sp1-guest-workspace-roots
branch
from
July 27, 2026 12:49
d0ece22 to
ea477b8
Compare
samuelburnham
marked this pull request as ready for review
July 27, 2026 14:45
samuelburnham
enabled auto-merge (squash)
July 27, 2026 14:48
johnchandlerburnham
approved these changes
Jul 27, 2026
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.
The zkVM guest crates (zisk/guest, zisk/agg-guest, sp1/guest) are compiled out-of-tree for the riscv target by the zkVM build scripts, never as part of the host workspace. They carried no
[workspace]of their own and relied purely on the ancestor manifests'excludelists to be treated as standalone.That breaks under a NESTED checkout. The benchmark base-run (bench-pr.yml) checks the base repo out under
base/INSIDE the PR checkout, so the base guest lives atbase/zisk/guest. The root manifest'sexclude = ["zisk", "sp1"]is relative, so it covers./ziskbut not./base/zisk; cargo's workspace search for the base guest walks up pastbase/zisk(which excludes it) to the outer PR-checkout root, which neither lists nor excludes it, andziskbuild'scargo metadatacall panics with "current package believes it's in a workspace when it's not". The base-sidezisk-hostbuild then fails and the main column of the bench comparison comes up empty (seen on the zisk-InitStd-execute base run).Give each guest its own empty
[workspace]table so cargo pins its workspace to the crate itself and never walks up to an ancestor, regardless of nesting — exactly what the cargo error recommends. Verified by reproducing the nested layout: without the table cargo emits the exact error; with it, resolution no longer reaches the outer workspace. The guests use noworkspace = trueinheritance, so a standalone root changes nothing else.Fixes the
n/aerrors for the base branch in the!benchmarkoutput, e.g. #442 (comment) (workflow logs)