Skip to content

fix(build): fix workspace root detection in build.rs#423

Merged
DorianZheng merged 2 commits into
mainfrom
fix/build-rs-workspace-root
Apr 2, 2026
Merged

fix(build): fix workspace root detection in build.rs#423
DorianZheng merged 2 commits into
mainfrom
fix/build-rs-workspace-root

Conversation

@DorianZheng

Copy link
Copy Markdown
Member

Summary

  • Fix build.rs incorrectly computing workspace root as CARGO_MANIFEST_DIR.parent() (src/) instead of the actual repo root after PR refactor: reorganize workspace into src/ layout #419 (src/ layout reorganization)
  • This caused find_prebuilt_shim/guest to search src/target/ (doesn't exist), resulting in v0.8.1 runtime tarballs missing boxlite-guest and boxlite-shim
  • Replace .parent() heuristic with find_workspace_root() that walks up looking for Cargo.toml containing [workspace]
  • Bump all SDK versions to 0.8.2

Test plan

  • make runtime produces complete runtime with guest + shim
  • cargo build -p boxlite-cli --release after make runtime now correctly embeds guest + shim (was "not found, skipping")
  • ls -dt target/release/build/boxlite-*/out/runtime | head -1 | xargs ls shows all 5 files in newest dir
  • cargo clippy -p boxlite --tests -- -D warnings passes clean
  • CI runtime build produces complete tarballs

…t reorganization

After PR #419 moved crates under src/, CARGO_MANIFEST_DIR.parent() resolved
to src/ instead of the repo root. This caused find_prebuilt_shim/guest to
search src/target/ (doesn't exist) instead of target/, resulting in runtime
tarballs missing boxlite-guest and boxlite-shim.

Replace the .parent() heuristic with find_workspace_root() that walks up
the directory tree looking for a Cargo.toml containing [workspace].

Also bumps all SDK versions to 0.8.2.
@DorianZheng DorianZheng merged commit da71624 into main Apr 2, 2026
12 checks passed
@DorianZheng DorianZheng deleted the fix/build-rs-workspace-root branch April 2, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant