Skip to main content

nub_host_common/
lib.rs

1//! Common types shared between the nub host (`nub-host-kvm`) and the
2//! in-sandbox guest (`nub-arch-guestbin`).
3//!
4//! Forked + stripped from upstream `hyperlight-common 0.15.0`
5//! (Apache-2.0). Everything related to FlatBuffers (the
6//! `flatbuffer_wrappers/` module, the generated `flatbuffers/` code,
7//! and the `func/` param-tuple polymorphism that fed those types)
8//! is gone — those layers are replaced by rkyv-archived RPC
9//! envelopes defined in [`rpc`].
10//!
11//! What remains:
12//! - [`outb`] — OUT-port action constants the host↔guest handshake uses.
13//! - [`vmem`] — virtual-memory + page-table helpers used by guest paging.
14//! - [`mem`] — layout / PEB constants.
15//! - [`layout`] — sandbox memory-layout constants.
16//! - [`log_level`] — guest log filter.
17//! - [`version_note`] — ELF version-note check for guest binaries.
18//! - [`rpc`] — `Request` / `Response` envelope types for the
19//!   rkyv-based RPC.
20
21#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::panic))]
22#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::expect_used))]
23#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::unwrap_used))]
24#![cfg_attr(not(feature = "std"), no_std)]
25
26extern crate alloc;
27
28pub mod layout;
29pub mod log_level;
30pub mod mem;
31pub mod outb;
32pub mod rpc;
33pub mod version_note;
34pub mod vmem;