chore: remove unused FFI module and C header - #36
Merged
Merged
Conversation
Signed-off-by: danbugs <danilochiarlone@gmail.com>
There was a problem hiding this comment.
Pull request overview
Removes an unused Rust FFI surface (and associated C header / crate types) for embedding hyperlight-unikraft from non-Rust hosts, keeping the project focused on the CLI/binary usage path.
Changes:
- Removed the
host/src/ffi.rsmodule and itspub mod ffi;export. - Deleted the C header
host/include/hyperlight_unikraft.h. - Updated
host/Cargo.tomlto stop producingcdylib/staticlibartifacts.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| host/src/lib.rs | Stops exporting the removed ffi module. |
| host/src/ffi.rs | Deletes the unused C-compatible FFI API implementation. |
| host/include/hyperlight_unikraft.h | Deletes the unused public C header for the removed FFI API. |
| host/Cargo.toml | Restricts crate type to Rust lib only (removes cdylib/staticlib). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: 651bcdd | Previous: 79b32ae | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
20 ms |
1 |
pandas (median) |
100 ms |
100 ms |
1 |
density (per VM) |
7 MB |
7 MB |
1 |
snapshot (disk) |
385 MiB |
385 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: 651bcdd | Previous: 79b32ae | Ratio |
|---|---|---|---|
hello_world (median) |
179 ms |
234 ms |
0.76 |
pandas (median) |
528 ms |
708 ms |
0.75 |
density (per VM) |
6 MB |
6 MB |
1 |
snapshot (disk) |
393 MiB |
393 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
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
The FFI module (
ffi.rs) exported C symbols (hl_vm_create,hl_vm_start,etc.) for embedding from C/Go, but has zero consumers. kraftkit's
plat-hyperlight branch uses hyperlight-unikraft as a CLI binary via
kraftexec.NewProcess, not via FFI. No C code, Go CGo bindings, Python ctypes,or CI steps reference the shared/static library.
host/src/ffi.rs(393 lines)host/include/hyperlight_unikraft.h(C header)pub mod ffi;from lib.rscdylibandstaticlibfrom Cargo.toml crate-typeTest plan
cargo checkandcargo testpass