refactor: simplify C SDK build, remove packaging scripts#333
Merged
DorianZheng merged 1 commit intomainfrom Mar 3, 2026
Merged
refactor: simplify C SDK build, remove packaging scripts#333DorianZheng merged 1 commit intomainfrom
DorianZheng merged 1 commit intomainfrom
Conversation
Since embedded-runtime is now the default feature, `cargo build -p boxlite-c`
produces a self-contained library. The packaging scripts that bundled
boxlite-runtime/, set RPATHs with install_name_tool/patchelf, and created
tarballs are no longer needed.
Changes:
- Delete scripts/package/{package-common,package-macos,package-linux}.sh
- Simplify `make dev:c` to `cargo build -p boxlite-c` (no runtime dep)
- Simplify `make dist:c` to release build + stage to sdks/c/dist/
- Remove `make package` target (alias for dist:c)
- Remove stale `embedded-runtime` feature forwarding from ffi/, sdks/c/,
and sdks/go/rust/ Cargo.toml files
- Simplify C test CMakeLists.txt: remove runtime dir discovery, point to
target/debug, update test:all:c to use dev:c
- Fix debugfs inject_file_into_ext4 to quote source paths (spaces in
macOS "Application Support" path broke guest binary injection)
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.
Summary
scripts/package/{package-common,package-macos,package-linux}.sh— no longer needed sinceembedded-runtimeis the default feature andlibboxliteis self-containedmake dev:c/make dist:c: Replace shell script dispatch with directcargo buildcommands, removeruntime/runtime-debugprerequisitesembedded-runtime,gvproxy-backend,libslirp-backendfeature forwarding fromffi/Cargo.toml,sdks/c/Cargo.toml, andsdks/go/rust/Cargo.tomlBOXLITE_RUNTIME_DIR,file(GLOB ...)fallback) fromsdks/c/tests/CMakeLists.txtbuild_inject_commandsto handle spaces in macOS~/Library/Application Support/paths — previously caused guest binary injection to silently failTest plan
cargo test -p boxlite --lib -- disk::ext4— all 5 unit tests pass (including newtest_build_inject_commands_path_with_spaces)make dev:c— builds C SDK (debug)make dist:c— builds C SDK (release) and stages tosdks/c/dist/make test:all:c— C SDK tests pass via CMake/CTestcargo clippy -p boxlite --tests -- -D warnings