Skip to content

refactor: reorganize workspace into src/ layout#419

Merged
DorianZheng merged 2 commits into
mainfrom
refactor/reorganize-workspace-crates
Apr 1, 2026
Merged

refactor: reorganize workspace into src/ layout#419
DorianZheng merged 2 commits into
mainfrom
refactor/reorganize-workspace-crates

Conversation

@DorianZheng

Copy link
Copy Markdown
Member

Summary

  • Move all Rust crates under src/ with short Firecracker-style names (e.g., boxlite-cli/src/cli/)
  • Move vendored C sys crates from boxlite/deps/ to src/deps/
  • Update all path references: Cargo.toml, .gitmodules, CI workflows, Makefile, codecov, pre-commit, docs

Motivation

The repo root was cluttered with 7 crate directories mixed with non-crate dirs. This reorganization gives a clean three-way split: src/ (Rust), sdks/ (language bindings), and supporting dirs.

Test plan

  • cargo metadata --no-deps resolves all workspace members
  • git submodule status shows correct new paths
  • CI workflows trigger on src/** path changes
  • make test passes (unit tests)

Move all Rust crates under src/ with short directory names, and
vendored C sys crates under src/deps/. This clears 7 crate directories
from the repo root, giving a clean three-way split: src/ (Rust),
sdks/ (language bindings), and supporting dirs (docs, examples, scripts).

Directory mapping:
- boxlite/           → src/boxlite/
- boxlite-cli/       → src/cli/
- boxlite-server/    → src/server/
- boxlite-shared/    → src/shared/
- ffi/               → src/ffi/
- guest/             → src/guest/
- test-utils/        → src/test-utils/
- boxlite/deps/*-sys → src/deps/*-sys

Updated: workspace Cargo.toml, per-crate path dependencies, SDK paths,
.gitmodules, CI workflows, Makefile, codecov, pre-commit, and docs.
@codecov

codecov Bot commented Apr 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The gitignore rules for libgvproxy-sys vendor/ and libkrun-sys target/
still referenced the old boxlite/deps/ paths. After git mv, 1570 Go
vendor files and a binary were accidentally committed. Remove them from
tracking and update the ignore rules to use src/deps/ paths.
@DorianZheng DorianZheng merged commit dbb11ec into main Apr 1, 2026
39 checks passed
@DorianZheng DorianZheng deleted the refactor/reorganize-workspace-crates branch April 1, 2026 13:53
DorianZheng added a commit that referenced this pull request Apr 2, 2026
…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 added a commit that referenced this pull request Apr 2, 2026
* fix(build): fix workspace root detection in build.rs after src/ layout 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.

* fix(node): remove stale optionalDependencies pinned to 0.8.1
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