1#![deny(unsafe_code)]
7
8mod errors;
9mod flat;
10#[cfg(target_os = "linux")]
11mod io_uring;
12
13pub use errors::OpenError;
14pub use errors::ParseError;
15pub use flat::FlatVmdkResolver;
16pub use flat::ResolveFlatVmdkError;
17
18use std::path::Path;
19use vm_resource::Resource;
20use vm_resource::kind::DiskHandleKind;
21
22pub(crate) const MAX_DESCRIPTOR_SIZE: u64 = 1 << 20;
24
25pub fn open_vmdk(path: &Path, read_only: bool) -> Result<Resource<DiskHandleKind>, OpenError> {
27 Ok(Resource::new(flat::open_flat_vmdk(path, read_only)?))
28}