Move libc from hyperlight-guest-bin to hyperlight-libc#1437
Move libc from hyperlight-guest-bin to hyperlight-libc#1437jprendes merged 10 commits intohyperlight-dev:mainfrom
Conversation
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Moves the picolibc/libc integration out of hyperlight-guest-bin into a new hyperlight-libc crate, updating repository references accordingly.
Changes:
- Adds a new
hyperlight-libcworkspace crate intended to provide picolibc + generated Rust bindings. - Updates
hyperlight-guest-binto depend on and re-exporthyperlight-libcbehind thelibcfeature. - Updates docs, scripts, and submodule paths to reference
src/hyperlight_libc/third_party/picolibc.
Reviewed changes
Copilot reviewed 13 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/c_guests/c_simpleguest/main.c | Updates comment to reflect the new picolibc location. |
| src/hyperlight_libc/src/lib.rs | Introduces the new hyperlight-libc crate API surface (bindings include). |
| src/hyperlight_libc/Cargo.toml | Defines the new crate and its build dependencies for compiling/binding generation. |
| src/hyperlight_libc/.cargo/config.toml | Sets a default target for building the new crate. |
| src/hyperlight_guest_bin/src/libc.rs | Refactors guest libc stubs to consume types/constants from generated bindings. |
| src/hyperlight_guest_bin/src/lib.rs | Switches guest-bin to re-export hyperlight-libc and renames the local module. |
| src/hyperlight_guest_bin/build.rs | Modifies build logic to build libc and generate bindings (currently still located in guest-bin). |
| src/hyperlight_guest_bin/Cargo.toml | Removes links and wires the libc feature to depend on hyperlight-libc. |
| docs/picolibc.md | Updates documentation paths to the new picolibc location. |
| c.just | Updates C include paths to point at the new picolibc/include locations. |
| NOTICE.txt | Updates license notice path to the new picolibc submodule location. |
| Cargo.toml | Adds hyperlight-libc to the workspace and workspace dependencies. |
| .gitmodules | Moves the picolibc submodule path from guest-bin to hyperlight-libc. |
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
andreiltd
left a comment
There was a problem hiding this comment.
I think this is great! One thing that would be nice is if we had README file in the new crate that documents what system interface or stubs the embedder needs to implement with the reference to the implementation in the guest_bin.
I think this is partially described in the picolibc.md file as well.
The picolibc documents it here: https://github.com/hyperlight-dev/picolibc-bsd/blob/main/doc/os.md
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Fixes #1398
Requires a new release of
cargo-hyperlightthat includes hyperlight-dev/cargo-hyperlight#50