1#![warn(clippy::doc_markdown)]
19#![warn(missing_docs)]
20#![warn(missing_debug_implementations)]
21#![cfg_attr(docsrs, feature(doc_cfg))]
22
23#[cfg(not(target_pointer_width = "64"))]
25compile_error!("vm-memory only supports 64-bit targets!");
26
27pub mod address;
28pub use address::{Address, AddressValue};
29
30#[cfg(feature = "backend-atomic")]
31pub mod atomic;
32#[cfg(feature = "backend-atomic")]
33pub use atomic::{GuestMemoryAtomic, GuestMemoryLoadGuard};
34
35mod atomic_integer;
36pub use atomic_integer::AtomicInteger;
37
38pub mod bitmap;
39
40pub mod bytes;
41pub use bytes::{AtomicAccess, ByteValued, Bytes};
42
43pub mod endian;
44pub use endian::{Be16, Be32, Be64, BeSize, Le16, Le32, Le64, LeSize};
45
46pub mod guest_memory;
47pub use guest_memory::{
48 Error as GuestMemoryError, FileOffset, GuestAddress, GuestAddressSpace, GuestMemory,
49 GuestUsize, MemoryRegionAddress, Result as GuestMemoryResult,
50};
51
52pub mod region;
53pub use region::{
54 GuestMemoryRegion, GuestMemoryRegionBytes, GuestRegionCollection, GuestRegionCollectionError,
55};
56
57pub mod io;
58pub use io::{ReadVolatile, WriteVolatile};
59
60#[cfg(feature = "backend-mmap")]
61pub mod mmap;
62
63#[cfg(feature = "backend-mmap")]
64pub use mmap::{GuestMemoryMmap, GuestRegionMmap, MmapRegion};
65#[cfg(all(feature = "backend-mmap", feature = "xen", target_family = "unix"))]
66pub use mmap::{MmapRange, MmapXenFlags};
67
68pub mod volatile_memory;
69pub use volatile_memory::{
70 Error as VolatileMemoryError, Result as VolatileMemoryResult, VolatileArrayRef, VolatileMemory,
71 VolatileRef, VolatileSlice,
72};