cargo-hyperlight
A cargo subcommand to build hyperlight guest binaries.
Write a hyperlight guest binary in Rust, and build it with a simple
And there's no need for any extra configuration.
Your binary, or any of its dependencies, can have a build.rs script using cc and bindgen to compile C code and generate bindings.
They will work out of the box!
[!NOTE] Your crate must have
hyperlight-guest-binas a transitive dependency.
Installation
Usage
Create a new crate for your hyperlight guest binary:
In your Cargo.toml
[]
= "guest"
= "0.1.0"
= "2024"
[]
= { = "0.11.0", = false }
= "0.11.0"
= "0.11.0"
The in your src/main.rs
extern crate alloc;
use Vec;
use ;
use Result;
use ;
use *;
pub extern "C"
Then to build the hyperlight guest binary, run
Your binary will be built for the x86_64-hyperlight-none target by default, and placed in target/x86_64-hyperlight-none/release/guest.
There's no need for any extra configuration, the command will take care of everything.
Releasing
To publish a new version:
- Update the version in
Cargo.toml - Commit the change:
git commit -S -s -am "Bump version to X.Y.Z"and open a PR - Create and push a tag:
git tag -s vX.Y.Z && git push origin vX.Y.Z
The CI will automatically run tests, publish to crates.io, and create a GitHub release.