Replace lexical Rust fragments with real modules

This commit is contained in:
ms2k 2026-07-19 05:12:57 +09:00
commit 247819250b

View file

@ -32,6 +32,13 @@ use rustix::fs::{
};
use rustix::io::dup;
use rustix::thread::{ThreadNameSpaceType, move_into_thread_name_spaces};
use storage::{
atomic_replace_at, create_directory, create_regular_file, descriptor_child_path,
descriptor_path, directory_has_entries, host_path, inspect_directory, move_all_entries,
move_selected_entries, open_directory, open_exact_directory_path, open_mounted_directory,
open_or_create_quarantine, open_regular_file, path_from_host, remove_directory_contents,
require_directory_descriptor_identity, require_same_descriptor, validate_relative_path,
};
const MOUNT_TIMEOUT: Duration = Duration::from_secs(5);
const MOUNT_POLL_INTERVAL: Duration = Duration::from_millis(2);
@ -565,7 +572,24 @@ impl<'layout, 'configuration> StateAnchorSandboxView<'layout, 'configuration> {
}
}
include!("lib/authority.rs");
include!("lib/mount.rs");
include!("lib/storage.rs");
include!("lib/tests.rs");
#[path = "lib/authority.rs"]
mod authority;
#[path = "lib/mount.rs"]
mod mount;
#[path = "lib/storage.rs"]
mod storage;
pub use authority::{
RuntimeStateAnchorAbsenceAuthority, RuntimeStateAnchorAuthority, RuntimeStateAnchorInherited,
RuntimeStateAnchorMount, StateAnchorAcquisition, StateAnchorLaunchAuthority,
VerifiedStateAnchorReadiness,
};
pub use mount::{
FuseOverlayfsMount, dispatch_private_state_anchor_recovery, recover_private_state_anchor_mount,
unmount_after_coordinator_loss,
};
pub use storage::{observe_mount_absence, require_mount_absent};
#[cfg(test)]
#[path = "lib/tests.rs"]
mod tests;