Skip to main content

javm_guest_x86/
lib.rs

1//! JAVM guest personality — the javm-cap state/cap system plugged into the
2//! generic nub guest kernel (`nub_arch_x86`). Three binary targets link
3//! against this lib: `javm-guest-x86` (production), `javm-guest-x86-tests`,
4//! `javm-guest-x86-benches`. The production guest-function table is stamped
5//! in `guest_prod` via `nub_arch_x86::register_guest_kernel!`.
6//!
7//! Host-visible surface: only [`test_abi`] (fn_id constants for the
8//! test/bench bins); everything else is `cfg(target_os = "none")`.
9
10#![cfg_attr(target_os = "none", no_std)]
11
12#[cfg(target_os = "none")]
13extern crate alloc; // register_guest_kernel! requirement
14#[cfg(target_os = "none")]
15extern crate hyperlight_guest_bin; // panic handler + allocator + macro paths
16
17#[cfg(target_os = "none")]
18pub mod cached_cap;
19#[cfg(target_os = "none")]
20pub mod call_loop;
21#[cfg(target_os = "none")]
22pub mod state_cache;
23
24/// Production guest-function table (linkme contributions).
25#[cfg(target_os = "none")]
26pub mod guest_prod;
27
28/// Javm-private test fn_ids (band >= 0x100). Always compiled — host-visible.
29pub mod test_abi;