Make split modules own their dependency imports

This commit is contained in:
ms2k 2026-07-19 05:28:45 +09:00
commit 76de24c75c
2 changed files with 123 additions and 91 deletions

View file

@ -1,17 +1,39 @@
use super::{
AsFd, AsRawFd, CapabilitySet, CoordinatorMessage, Duration, FdFlags, File, FileType, GitSentry,
HostProcessOwnershipSlot, Instant, MemfdFlags, Mode, MountIdentity, NamespaceIdentity,
NetworkAttestationContext, OFlags, PRIVATE_ROUTER_ROLE, PathBuf, PipeFlags, PreparedNetwork,
ProcessOwnershipContext, READINESS_TIMEOUT, Read, ResolveFlags, RetainedProcess,
RuntimeArguments, RuntimeGitRoutingArguments, RuntimeNetworkArguments,
use std::fs::File;
use std::io::{self, Read};
use std::os::fd::{AsFd, AsRawFd};
use std::path::PathBuf;
use std::time::{Duration, Instant};
use lazaret_core::identity::{MountIdentity, NamespaceIdentity};
use lazaret_core::records::{HostProcessOwnershipSlot, StagedProcessOwnership};
use lazaret_ignored_workspace::{GitSentry, PRIVATE_ROUTER_ROLE};
use lazaret_linux::capability;
use lazaret_linux::filesystem::mount_identity;
use lazaret_linux::process::{
ProcessOwnershipContext, RetainedProcess, TargetCommand, child_broker, current_process_identity,
};
use lazaret_state_anchor::{
RuntimeStateAnchorAbsenceAuthority, RuntimeStateAnchorAuthority, RuntimeStateAnchorInherited,
RuntimeStateAnchorMount, StagedProcessOwnership, SupervisorEvent, TargetCommand,
attached_runsc_standard_io, capability, child_broker, current_process_identity,
enter_generation_filesystem_namespaces, enter_generation_network_namespace, fail_network,
fail_runtime_components, fail_with_runtime_cleanup, fcntl_setfd, fstat, io, memfd_create,
mount_identity, openat2, pipe_with, prepare_network, probe_current_network, receive_message,
require_lifetime_held, runsc_delete_target, runsc_target, send_message, supervise,
wait_and_reap, wait_for_runsc_ready,
RuntimeStateAnchorMount,
};
use rustix::fs::{FileType, MemfdFlags, Mode, OFlags, ResolveFlags, fstat, memfd_create, openat2};
use rustix::io::{FdFlags, fcntl_setfd};
use rustix::pipe::{PipeFlags, pipe_with};
use rustix::thread::CapabilitySet;
use crate::network::{
NetworkAttestationContext, PreparedNetwork, enter_generation_filesystem_namespaces,
enter_generation_network_namespace, prepare_network, probe_current_network,
};
use super::runtime::{
attached_runsc_standard_io, fail_network, fail_runtime_components, fail_with_runtime_cleanup,
receive_message, require_lifetime_held, runsc_delete_target, runsc_target, send_message,
supervise, wait_and_reap, wait_for_runsc_ready,
};
use super::{
CoordinatorMessage, READINESS_TIMEOUT, RuntimeArguments, RuntimeGitRoutingArguments,
RuntimeNetworkArguments, SupervisorEvent,
};
pub(super) fn run_supervisor(arguments: &RuntimeArguments) -> io::Result<()> {

View file

@ -7,6 +7,7 @@ use lazaret_linux::process::ChildStandardIoPolicy;
use rustix::pipe::{PipeFlags, pipe_with};
use sha2::{Digest, Sha256};
use super::runtime::{attached_runsc_standard_io, runsc_delete_target, runsc_target};
use super::*;
#[test]