hyperlight_host/mem/mod.rs
1/*
2Copyright 2025 The Hyperlight Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17/// A simple ELF loader
18pub(crate) mod elf;
19/// A generic wrapper for executable files (PE, ELF, etc)
20pub(crate) mod exe;
21/// Functionality to establish a sandbox's memory layout.
22pub mod layout;
23/// memory regions to be mapped inside a vm
24pub mod memory_region;
25/// Functionality that wraps a `SandboxMemoryLayout` and a
26/// `SandboxMemoryConfig` to mutate a sandbox's memory as necessary.
27pub mod mgr;
28/// Structures to represent pointers into guest and host memory
29pub mod ptr;
30/// Structures to represent memory address spaces into which pointers
31/// point.
32pub(super) mod ptr_addr_space;
33/// Structures to represent an offset into a memory space
34pub mod ptr_offset;
35/// A wrapper around unsafe functionality to create and initialize
36/// a memory region for a guest running in a sandbox.
37pub mod shared_mem;
38/// A wrapper around a `SharedMemory` and a snapshot in time
39/// of the memory therein
40pub mod shared_mem_snapshot;
41/// Utilities for writing shared memory tests
42#[cfg(test)]
43pub(crate) mod shared_mem_tests;