Repository navigation
core: make checkpoint, image, profiles and COW optional - #297
Merged
Merged
Conversation
congwang-mk
force-pushed
the
optional-core-features
branch
2 times, most recently
from
October 12, 2026 21:10
15fbe3a to
1390b63
Compare
Checkpoint and restore currently pull bincode into every build, including embedders that only need process isolation. They also compile the C restore stub even when the application never restores a checkpoint. Add a default-enabled checkpoint feature and forward it through the CLI, FFI and OCI crates. Gate the Rust checkpoint engine and the restore stub build with compile-time feature checks. Compile the checkpoint C entry points only when the feature is enabled, so disabled builds omit their exports and opaque handle type. Gate checkpoint-specific tests and OCI commands with the feature. Add GitHub CI jobs for minimal, checkpoint-only and default builds, together with a generated C header comparison. Document how embedders can omit checkpoint support and its bincode dependency. Signed-off-by: Cong Wang <cwang@multikernel.io>
Local image extraction and remote image loading bring archive, compression and Docker client dependencies into embedders that use host filesystem paths directly. These dependencies should follow image support. Add a default-enabled image feature and forward it through the workspace. Keep image extraction and pulling under the same feature, and move the Docker client dependencies out of the HTTP feature. Remote transports continue to require HTTP support as well. Gate the Rust image module and builder method. Compile the image C entry points only when the feature is enabled, and reject CLI image requests when image support is disabled. Extend GitHub CI with an image-only job and document the feature boundary. Signed-off-by: Cong Wang <cwang@multikernel.io>
Embedders that construct policies directly do not need TOML profile parsing or serialization. The profile schema is also used by live JSON inspection, so removing that schema would disable unrelated functionality. Add a default-enabled profiles feature for TOML loading, writing and CLI learning. Keep the policy schema and JSON inspection available in minimal builds. Return a feature-disabled error for TOML operations when profiles are omitted, and forward the feature through the workspace crates. Gate TOML-specific tests and extend GitHub CI with a profiles-only job. Keep TOML as a core development dependency for the existing expansion fixtures without retaining it in the minimal production dependency graph. Document which profile operations remain available. Signed-off-by: Cong Wang <cwang@multikernel.io>
congwang-mk
force-pushed
the
optional-core-features
branch
from
October 12, 2026 21:16
1390b63 to
9c6e2b9
Compare
Copy-on-write branches, recovery and transactions bring filesystem and hashing dependencies into every sandbox build. Minimal embedders should be able to omit them while retaining ordinary filesystem isolation. Add a default-enabled cow feature and gate branch state, syscall handlers, recovery and transaction code. Reject COW configuration when the feature is disabled, both in the builder and before starting a deserialized sandbox, so a requested COW policy cannot silently become direct writes. Keep serialized policy fields stable across feature configurations. Make image support enable cow to protect cached image contents. Require both profiles and cow for CLI learning, which discards observed writes. Keep the chroot syscall-filter test active without cow and gate its COW counterpart separately. Expand the existing minimal-build CI job into a matrix for each feature and the minimal build, including production dependency checks. Reuse the existing default-build and C header jobs instead of a separate workflow. Add disabled-feature tests for policy validation and JSON inspection. Forward the selected features into the C smoke test build and check that checkpoint and image symbols are exported exactly when enabled. Document the feature dependencies and the reduced C API in the build guide. Signed-off-by: Cong Wang <cwang@multikernel.io>
congwang-mk
force-pushed
the
optional-core-features
branch
from
October 12, 2026 21:22
9c6e2b9 to
b8f6460
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.
Summary
Make checkpoint, image, TOML profiles and filesystem COW optional in four separate commits. Together with the existing HTTP feature, these provide five feature boundaries for minimal embedders. All five remain enabled by default.
checkpointgates the checkpoint engine, bincode dependency, OCI checkpoint commands and C restore stub compilation.imagegates local extraction and remote image loading together, including archive, compression and Docker client dependencies. It enablescow; remote transports also requirehttp.profilesgates TOML loading and writing while preserving the policy schema and JSON inspection.cowgates filesystem branches, recovery and transactions. Disabled builds reject COW configuration in both the builder and the process creation path. CLI learning requires bothprofilesandcowto discard writes during observation.Forward the features through the CLI, FFI and OCI crates. Compile checkpoint and image C entry points only with their respective features. Keep serialized policy fields, and reject unavailable policy operations explicitly. Document feature behavior in
docs/building.md, with brief build commands in the README.Validation
Expand the existing minimal CI job into a matrix for minimal builds and each individual feature, reusing the default-build and C header jobs. Check production dependency graphs, run workspace tests, and regenerate the C header to check ABI declarations. Add tests for disabled-feature behavior and make the C smoke test use the selected features. Inspect the shared library exports to verify that checkpoint and image C symbols are present only when enabled.
The earlier CI failures were corrected: split the chroot and COW syscall-filter tests, and gate learning tests on both profiles and COW. CI is rerunning for the latest changes to the exported C symbols.
All builds and tests run on GitHub. No local builds or tests were run.
Fixes #293 and #294.