Cleanup the hyperlight-host public API #765
Copy link
Copy link
Open
0 / 10 of 1 issue completedLabels
lifecycle/confirmedBug is verified or proposal seems reasonableBug is verified or proposal seems reasonable
Milestone
Description
Currently the following items are publicly exported from hyperlight-host, and I believe many of them were never intended to be public, we should fix that.
For items that are not intended to be public, but are needed by macros, we should mark them as #[doc(hidden)], and ideally be moved to a properly named module, something like _private
Crossed out are the items I believe don't need to be public.
List of all items
Structs
- func::HostFunction
-
hypervisor::VirtualCPU -
mem::memory_region::MemoryRegion -
mem::memory_region::MemoryRegionFlags -
mem::ptr::RawPtr -
mem::shared_mem::ExclusiveSharedMemory -
mem::shared_mem::GuestSharedMemory -
mem::shared_mem::HostMapping -
mem::shared_mem::HostSharedMemory - sandbox::config::SandboxConfiguration
- sandbox::initialized_multi_use::MultiUseSandbox
- sandbox::snapshot::Snapshot
- sandbox::uninitialized::GuestBlob
- sandbox::uninitialized::GuestEnvironment
- sandbox::uninitialized::UninitializedSandbox
Enums
- error::HyperlightError
- func::ParameterValue
- func::ReturnType
- func::ReturnValue
-
hypervisor::HyperlightExit -
mem::memory_region::MemoryRegionType - sandbox::uninitialized::GuestBinary
Traits
- func::ParameterTuple
- func::Registerable
- func::ResultType
- func::SupportedParameterType
- func::SupportedReturnType
- hypervisor::InterruptHandle
-
mem::shared_mem::AllValid -
mem::shared_mem::SharedMemory - sandbox::Callable
Macros
-
and -
debug - log_then_return
- new_error
-
or
Functions
-
sandbox::is_hypervisor_present -
sandbox::is_supported_platform
Type Aliases
- Result
- sandbox::ExtraAllowedSyscall
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lifecycle/confirmedBug is verified or proposal seems reasonableBug is verified or proposal seems reasonable
Type
Projects
- StatusShow more project fieldsNo status
Activity
jprendes commentedon Aug 5, 2025
From the things I believe should be public, they live in the following modules:
func: 9 items, most supporting theHostFunctiontrait, the only other item is theRegisterabletrait.{HostFunction, ParameterValue, ReturnType, ReturnValue, ParameterTuple, Registerable, ResultType, SupportedParameterType, SupportedReturnType}sandbox: 9 items, this is the most varied module.{config::SandboxConfiguration, initialized_multi_use::MultiUseSandbox, snapshot::Snapshot, uninitialized::GuestBlob, uninitialized::GuestEnvironment, uninitialized::UninitializedSandbox, uninitialized::GuestBinary, Callable, ExtraAllowedSyscall}error: 1 item{HyperlightError}::(crate's root): 3 items, macros andResult{log_then_return, new_error, Result}and one outlier,
hypervisor::InterruptHandle, which arguably should belong to a different module, probablysandbox.jsturtevant commentedon Aug 20, 2025
There was a Suggestion that we mark these as depreciated, we use these internally so might need to add allows as well
simongdavies commentedon Mar 11, 2026
Linked to #1268
jsturtevant commentedon Jun 17, 2026
This is dependent on the changes in #1268