Skip to main content

build

Function build 

Source
pub fn build(manifest_dir: &str, bin_name: &str, features: &[&str]) -> PathBuf
Expand description

Cross-compile a hyperlight guest crate. Returns the path to the resulting ELF binary, suitable for include_bytes! or for passing to hyperlight_host::GuestBinary::FilePath.

manifest_dir is relative to the calling build.rs’s CARGO_MANIFEST_DIR. bin_name is the [[bin]] name to build. features is forwarded to cargo as --features <comma-joined>; pass &[] for no extras.

Emits cargo:rerun-if-changed for the guest crate’s src/ and Cargo.toml, plus cargo:rerun-if-env-changed for SKIP_GUEST_BUILD. Respects the BUILD_CRATE_GUEST_BUILD env var as a recursion guard (mirrors build-javm).