Repository navigation
nvx-rs: split the platform modules, the store, and the supervisor along their sections - #1064
Open
Pedro Henrique Penna (ppenna) wants to merge 7 commits into
Open
Pedro Henrique Penna (ppenna) wants to merge 7 commits into
Pedro Henrique Penna (ppenna) wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the host-module reorganization.
No open issues 🎉
What changed in this PR
Completes the remaining host-module splits planned in #898, continuing #896’s structural refactor. The changes reorganize existing code while preserving public entry points, test names, and documentation link targets.
Changes:
- Split Linux and Windows platform implementations into focused private modules.
- Extract store constants and launch handling, and separate supervisor launches, VM lifecycle operations, and reattachment.
- Adjust imports, visibility, and documentation links for the new layout, and document it in the README.
| File | Description |
|---|---|
nvx-rs/src/host/supervisor/vmm.rs |
Moves VM handles, stopping, and termination into a dedicated module. |
nvx-rs/src/host/supervisor/tests.rs |
Updates imports for the extracted supervisor modules. |
nvx-rs/src/host/supervisor/reattach.rs |
Isolates reattachment and runtime-identity checks. |
nvx-rs/src/host/supervisor/launch.rs |
Isolates launch, commit, and abandonment handling. |
nvx-rs/src/host/store/tests.rs |
Updates imports for the store split. |
nvx-rs/src/host/store/names.rs |
Collects record-format and store-file constants. |
nvx-rs/src/host/store/launch.rs |
Moves launch transactions and recovery outcomes into a sibling module. |
nvx-rs/src/host/platform/windows/process.rs |
Isolates process handles, host identity, and time queries. |
nvx-rs/src/host/platform/windows/private.rs |
Collects privacy checks and protected filesystem operations. |
nvx-rs/src/host/platform/windows/mod.rs |
Declares private modules and preserves existing exports. |
nvx-rs/src/host/platform/windows/log_claim.rs |
Isolates job-object and log-claim handling. |
nvx-rs/src/host/platform/windows/interrupt.rs |
Separates CLI Ctrl-C handling. |
nvx-rs/src/host/platform/windows/identity.rs |
Collects file identities and directory-handle operations. |
nvx-rs/src/host/platform/windows/endpoint.rs |
Isolates named-pipe transport and restore-ready listeners. |
nvx-rs/src/host/platform/linux/tests.rs |
Moves platform tests into their existing module path. |
nvx-rs/src/host/platform/linux/spawn.rs |
Separates process detachment and descriptor inheritance. |
nvx-rs/src/host/platform/linux/process.rs |
Isolates process identity, pidfd waits, and host-time queries. |
nvx-rs/src/host/platform/linux/private.rs |
Collects ownership, permission, and private-file operations. |
nvx-rs/src/host/platform/linux/mod.rs |
Retains constants and hypervisor probing while re-exporting moved items. |
nvx-rs/src/host/platform/linux/log_claim.rs |
Isolates log locking and launch-process verification. |
nvx-rs/src/host/platform/linux/identity.rs |
Collects file identities and directory-relative operations. |
nvx-rs/src/host/platform/linux/endpoint.rs |
Isolates Unix-socket transport and restore-ready listeners. |
nvx-rs/README.md |
Documents the platform, store, and supervisor source layout. |
Review effort: Max
Pedro Henrique Penna (ppenna)
marked this pull request as ready for review
October 31, 2026 02:12
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 31, 2026
host/platform/windows.rs holds, in 3,659 lines, the Windows primitives of NVX hosts: the processes that the host holds and spawns, the directories and files private to the current user, the identities of files, the claim of a launch's log, OpenVMM's named-pipe endpoints, the CLI's Ctrl-C, and 1,085 lines of inline tests. The next commit splits it into a directory module along those sections, as #898 lays them out. Move it first, unchanged, to host/platform/windows/mod.rs, with git mv, in a commit of its own, so that git log --follow and git blame follow it through the split. Its module path, host::platform::windows, stays the same, and with it the paths of its items and the names of its tests. Validation at this commit, on Windows: the crate builds with all features and all targets, and the lists of tests, with all features, with default features, and of the library without default features, are those of dev (1,323, 1,086, and 270). Part of #898. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
host/platform/windows/mod.rs, which the previous commit moved from host/platform/windows.rs, held the Windows primitives of NVX hosts. Split it along its sections, as #898 lays them out: - process.rs: from creation_time through monotonic_ns, the processes that this user may query, wait for, and terminate, held through their handles, the bytes that processes read, the identities of the boot and of the host, and the host's monotonic time; - spawn.rs: from LaunchedProcess through append_argument, the spawns of OpenVMM, which pass it only the handles that they list, and the processes that they launch; - private.rs: from create_private_dir through set_access, the directories and files that only the current user may access and their access control lists, and make_sparse and rename_no_replace; - identity.rs: from file_identity through handle_information, the identities of files, is_deleted, and Directory; - log_claim.rs: from claim_log through serves_launch, the claim of a launch's log and the job object named after the log; - endpoint.rs: from control_endpoint through PipeTransport, the named pipes of OpenVMM's control endpoint and of a clone's restore-ready event; - interrupt.rs: from INTERRUPTED through interrupted, the CLI's Ctrl-C; - tests.rs: the inline tests, which keep their module path, host::platform::windows::tests, and so their names. SUPPORTED, the handle helpers from wide through open_handle, and probe_hypervisor stay in mod.rs. Since #898 was written, #1040 grew the claim from a few lines into the job objects of 330 lines, which would make identity.rs 690 lines, more than the smallest of the files that #898 splits. The claim gets a module of its own, as it does on Linux in a later commit, so that both platforms keep the same modules. The code moves unchanged. The new modules are private, and mod.rs re-exports their items under the visibility that they had, so that host::platform, which re-exports the items of the platform's module with a glob, keeps its surface. The re-exports of spawn_foreground, watch_interrupts, and interrupted take the cli feature, as those items do, and that of set_access takes test. interrupt.rs holds items of the cli feature alone, so its module takes the feature, and its items drop their own cfg attributes. The helpers that the new modules take from one another become pub(super): from process.rs, creation_time and refused_termination, which spawn.rs takes, and the fields of ProcessHandle, which LaunchedProcess::pin fills; from identity.rs, handle_information and status_error; and from private.rs, CurrentUser and its constructor, with_owner_only_attributes, Required, and privacy_problem. So do the helpers that the tests take: wait_step and end_process, command_line and the process field of LaunchedProcess, and log_job_name, log_job_id, object_name, local_directory, and log_job_processes. The spawn's test hook, which spawn_listed calls, now goes through super::tests, and the calls of host::platform's unless_exited, parse_host_id, and time_left, which went through super::, import them instead. Imports that only cli code uses take cfg(feature = "cli"). The tests import the names that they took from mod.rs's imports through their glob, and without the indentation of the inline module, rustfmt joins two of their statements. Eleven links in the moved documentation name items that their new modules do not import: spawn_detached, control_endpoint, LaunchedProcess::pin, create_log_job, and log_claim_held, which now live in sibling modules, and SpawnLock and spawn_command, which three links named with super:: paths that would now resolve from host::platform::windows rather than host::platform. Each of their doc comments gets link definitions with crate paths (#896, invariant 6), the super:: links become references to them, and the two paragraphs that held those links are rewrapped. The rendered documentation does not change. Validation at this commit, on Windows: cargo public-api finds no difference from dev in rustdoc's JSON for Windows and for Linux, and, with private items, the crate's 16,518 items keep their names, with the items of the new modules named as their parent's, and its 2,866 intra-doc links keep their targets; only the eight doc comments above change, and rustdoc reports no new warning. The lists of tests, with all features, with default features, and of the library without default features, are those of dev (1,323, 1,086, and 270). Clippy with warnings denied passes for Windows on all targets with all features, with default features, and with cli, on the library with default features, without them, and with each of cli, testing, and bundled, and for Linux on all targets and on the library; cargo check passes for macOS and with Rust 1.89; rustdoc with warnings denied passes; and the 28 tests of host::platform and the 22 of the host-module guard pass. Part of #898. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
host/platform/linux.rs holds, in 1,315 lines, the Linux primitives of NVX hosts: the processes that the host holds, the identities of the boot and of the host, the spawns that pass a VMM only the descriptors that they list, the directories and files private to the current user, the identities of files, the claim of a launch's log, OpenVMM's Unix socket endpoints, and 158 lines of inline tests. The next commit splits it into a directory module along those sections, as #898 lays them out. Move it first, unchanged, to host/platform/linux/mod.rs, with git mv, in a commit of its own, so that git log --follow and git blame follow it through the split. Its module path, host::platform::linux, stays the same, and with it the paths of its items and the names of its tests. Validation at this commit, on Windows: Clippy with warnings denied passes for Linux on all targets and on the library, with all features, with default features, and without them. Part of #898. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
host/platform/linux/mod.rs, which the previous commit moved from host/platform/linux.rs, held the Linux primitives of NVX hosts. Split it along its sections, as #898 lays them out, and as the previous commits split the Windows module: - process.rs: from process_start_time through monotonic_ns, the processes that this user may wait for and kill, held through pidfds, the bytes that processes read, the identities of the boot and of the host, and the host's monotonic time; - spawn.rs: detach, inherit_only, and allowlist, which pass OpenVMM no descriptor of the caller but those that they list; - private.rs: from create_private_dir through open_plain_dir, the directories and files that only the current user may access and their modes, and make_sparse, rename_no_replace, and restore_private_file_mode; - identity.rs: from file_identity through Directory, the identities of files, is_deleted, and the open directories; - log_claim.rs: claim_log, log_claim_held, and serves_launch, the claim of a launch's log, which on Windows needs a module of its own; - endpoint.rs: from control_endpoint through UnixTransport, the Unix sockets of OpenVMM's control endpoint and of a clone's restore-ready event; - tests.rs: the inline tests, which keep their module path, host::platform::linux::tests, and so their names. The re-export of the sys module's interrupt functions for the CLI, the constants at the top of the file, and probe_hypervisor stay in mod.rs. The code moves unchanged. The new modules are private, and mod.rs re-exports the items that other modules take from host::platform, under the visibility that they had, so that host::platform, which re-exports the items of the platform's module with a glob, keeps its surface. Only the CLI uses inherit_only, whose re-export takes the cli feature, as the item does, and only tests outside the module use check_identity, start_time_from_stat, store_dir_problem, and owner_only_problem, whose re-exports take test, as the crate's other re-exports for tests alone do. No module outside host::platform::linux uses foreign_writer or other_threads_remain, which need no re-export. identity.rs takes owner_and_mode from private.rs, which becomes pub(super), as do wait_step, which the tests take from process.rs, and UnixTransport and its stream field, with which a test builds a transport. The calls of host::platform's unless_exited, parse_hex_id, parse_host_id, and time_left, which went through super::, import them instead. The tests import the names that they took from mod.rs's imports through their glob. One link in the moved documentation of Directory::store_dir_problem names check_store_dir, which identity.rs does not import. Its doc comment gets a link definition with the crate path (#896, invariant 6), and the rendered documentation does not change. Validation at this commit, on Windows: cargo public-api finds no difference from dev in rustdoc's JSON for Windows and for Linux, and, with private items, the crate's 27,621 items for Linux keep their names, with the items of the new modules named as their parent's, and its 3,903 intra-doc links keep their targets; only the doc comment above changes, and rustdoc reports no new warning. Clippy with warnings denied passes for Linux on all targets with all features, with default features, and with cli, and on the library with default features, without them, and with each of cli, testing, and bundled. The Linux tests run in CI. Part of #898. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
host/store/mod.rs held, in 1,362 lines, the store's module documentation, the version of its records and the names of its files, SandboxStore and its helpers, LockedStore, and the launches that a locked store begins. Split it along those sections, as #898 lays them out: - names.rs: from FORMAT through FILE_NAMES, the version of the store's records and the names of the files that it keeps in a sandbox's directory; - locked.rs: LockedStore, the Reservation of a clone's launch, and their implementations; - launch.rs: end_process, Recovery, and Launch, a launch in progress from the marker of its journal to its runtime record. The module documentation, the existing submodules, SandboxStore and its helpers, and the constants of its waits, LOCK_RETRY_INTERVAL and CLAIM_RELEASE_WAIT, stay in mod.rs. The module documentation keeps its lines, so its two doctests keep their names, which name their lines. The code moves unchanged. The new modules are private, and mod.rs re-exports their public items, so every path under nvx::host::store resolves as before, and Reservation, which other modules of the crate import, under its pub(crate) visibility. It also imports CLONE_FILE_NAMES, which lifecycle.rs takes from it. LockedStore's constructor, end_launch, and end_identified, and its lock, files, and lock_removed fields, which mod.rs, launch.rs, lifecycle.rs, and the tests use, become pub(super), as do end_process and the fields of Launch, which locked.rs uses, and CLONE_FILE_NAMES. The new modules take the record and vmm modules through super. mod.rs drops the imports that only the moved code used, and the tests import FileIdentity and Process, which they took from them through their glob. The moved documentation linked to the sections of the module documentation with self#, which would now name the new modules, and to super::instance and super::supervisor::spawn, which would now resolve from host::store rather than host. It also named ErrorKind and the store's file names, which the new modules do not import. Each of those doc comments gets link definitions with crate paths (#896, invariant 6), its self# and super:: links become references to them, and the lines that they shortened take words from the lines below them. The module documentation gets definitions for Process, Process::open, and ProcessRef, which it named through the imports that mod.rs drops. The rendered documentation does not change. Validation at this commit, on Windows: cargo public-api finds no difference from dev in rustdoc's JSON for Windows and for Linux, and, with private items, the crate's items keep their names, with the items of the new modules named as their parent's, and its intra-doc links keep their targets, 2,866 for Windows and 3,903 for Linux; only the doc comments above change, and rustdoc reports no new warning. The lists of tests, with all features, with default features, and of the library without default features, are those of dev (1,323, 1,086, and 270). Clippy with warnings denied passes for Windows and Linux on all targets with all features, with default features, and with cli, and on the library with default features, without them, and with each of cli, testing, and bundled; cargo check passes for macOS and with Rust 1.89; rustdoc with warnings denied passes; and the 64 tests of host::store, the 11 of tests/store.rs, the store's two doctests, and the 22 tests of the host-module guard pass. Part of #898. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
host/supervisor/mod.rs held, in 1,015 lines, the supervisor's module documentation, its launches, the VMs that it holds and their stops, and its reattaches. Split it along those sections, as #898 lays them out: - launch.rs: launch, LaunchFailure, launch_reporting, abandon_after, and Starting, the launches through the store's launch journal and the starting launches that their callers commit or abandon; - vmm.rs: Vmm, StopOutcome, Stopped, and the stop and terminate steps, from check_bound through undetermined; - reattach.rs: Reattached, reattach, reattach_reporting, and reattach_with. mod.rs keeps the module documentation, whose lines do not change, so its doctest keeps its name, which names its line, and the re-exports of the spawn and inheritance items. The code moves unchanged. The new modules are private, and mod.rs re-exports their public items, so every path under nvx::host::supervisor resolves as before, and launch_reporting and reattach_reporting, which the template's clones use, under their pub(crate) visibility. The fields of Vmm, which launch.rs and reattach.rs fill, become pub(super), as do the helpers that the tests take: Vmm's stop_with, stop_unless_exited_with, and terminate_with, and Stoppable, stop_process, terminate_process, and reattach_with. rustfmt wraps the signature of terminate_process, which the visibility makes too long for one line. mod.rs drops the imports that only the moved code used, and the tests import the names that they took from them through their glob. launch and reattach now name both a module and a function of host::supervisor, which makes the links to the functions ambiguous (#896, invariant 6): the module documentation's links to them, and the links of vmm.rs, take fn@ definitions. The module documentation also gets definitions for the store's and the process module's items that it named through the imports that mod.rs drops. Three links of vmm.rs named MAX_TIMEOUT with super::launch, which from vmm.rs names the new module rather than host::launch, and so no longer resolves; they become references to a definition with its crate path, and the lines that they shortened take words from the lines below them. Two other links of vmm.rs name Starting::commit and Reattached::Mismatched, which vmm.rs does not import, and get definitions too. The rendered documentation does not change. Validation at this commit, on Windows: cargo public-api finds no difference from dev in rustdoc's JSON for Windows and for Linux, and, with private items, the crate's items keep their names, with the items of the new modules named as their parent's, and its intra-doc links keep their targets, 2,866 for Windows and 3,903 for Linux; only the doc comments above change, and rustdoc reports no new warning. The lists of tests, with all features, with default features, and of the library without default features, are those of dev (1,323, 1,086, and 270). Clippy with warnings denied passes for Windows and Linux on all targets with all features, with default features, and with cli, and on the library with default features, without them, and with each of cli, testing, and bundled; cargo check passes for macOS and with Rust 1.89; rustdoc with warnings denied passes; and the 26 tests of host::supervisor, the 20 that tests/supervisor.rs runs, the supervisor's doctest, and the 22 tests of the host-module guard pass. Part of #898. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The README's layout section describes how #945 split the filesystem module, the instance module, and the CLI's managed sandbox lifecycle into private siblings behind their mod.rs files. Describe the same for the modules that the previous commits split: the Linux and Windows platform modules, which keep the same siblings, the store, and the supervisor. The table of modules does not change, since no module's purpose does. Validation: scripts/check_markdown_links.py passes. Part of #898. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/fix-issue-898-draft-pr-review-comments
branch
from
October 31, 2026 06:05
e39976a to
8bdc4a8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #898. Part of #896.
This splits the last four of the oversized files of
nvx::hostthat #898 lists,platform/windows.rs,platform/linux.rs,store/mod.rs, andsupervisor/mod.rs, into directory modules along their existing sections. #921 splitnetwork/mod.rs,artifacts.rs,cli/sandbox/mod.rs, andsandbox/mount.rs, and #945 splitfilesystem.rs,instance.rs, andcli/sandbox/lifecycle.rs; the pull requests that edited the files of this one (#881, #885, #886, #887, #888) have all merged since.sandbox/plan.rsstays whole, as #898 says.The code moves unchanged. The public API, the names of the tests, and the targets of the intra-doc links stay the same.
Commits
Each commit splits one file. A file that becomes
X/mod.rsfirst moves there withgit mv, in a commit of its own, so thatgit log --followandgit blamefollow it;store/mod.rsandsupervisor/mod.rsare alreadymod.rsfiles.platform/windows.rsmoves toplatform/windows/mod.rsunchanged.process.rs,spawn.rs,private.rs,identity.rs,log_claim.rs,endpoint.rs,interrupt.rs(featurecli), andtests.rs.SUPPORTED, the handle helpers, andprobe_hypervisorstay inmod.rs.process.rs,spawn.rs,private.rs,identity.rs,log_claim.rs,endpoint.rs, andtests.rs. The constants andprobe_hypervisorstay inmod.rs.store/mod.rs(1,362 lines) becomesnames.rs(FORMATand the file names),locked.rs(LockedStoreandReservation), andlaunch.rs(end_process,Recovery, andLaunch). The module documentation,SandboxStore, and its helpers stay inmod.rs(658 lines).supervisor/mod.rs(1,015 lines) becomeslaunch.rs,vmm.rs, andreattach.rs. The module documentation and the spawn re-exports stay inmod.rs.Where this departs from #898's plan
log_claim.rs. nvx-rs: split the host's oversized files into directory modules #898 puts the log claim inidentity.rs. Since it was written, nvx-rs: start Windows VMMs in a job object of their log, so a process spawned in their window holds no claim #1040 grew the Windows claim from a few lines into job objects, 330 lines, which would makeidentity.rs690 lines, more thanplatform/linux.rswas when nvx-rs: split the host's oversized files into directory modules #898 listed it. The claim gets a module of its own on both platforms, so that they keep the same modules.host_idandmonotonic_nsjoinprocess.rs, the store-directory checks,make_sparse, andrename_no_replacejoinprivate.rs,Directoryjoinsidentity.rs, the restore-ready listener joinsendpoint.rs,Reservationjoinslocked.rs, andLaunchFailure,launch_reporting, andreattach_reportingjoin the supervisor'slaunch.rsandreattach.rs.reattach. Likelaunch, which nvx-rs: split the host's oversized files into directory modules #898 names, thereattachmodule shares its name with a function of its parent, so the links to that function takefn@too.What changes besides the moved lines
Each commit message lists these in detail.
mod.rsre-exports the public items, and the crate-visible items that other modules use, under their visibility.platform/mod.rs, which re-exports the platform's module with a glob, keeps its surface. A re-export that only one feature or only tests use takes thatcfg, as in nvx-rs: split four of the host's oversized files into directory modules #921. The private helpers and fields that siblings or the tests share becomepub(super), as nvx-rs: split the host's oversized files into directory modules #898 asks.super::paths in code. The moved calls ofhost::platform'sunless_exited,parse_hex_id,parse_host_id, andtime_left, which went throughsuper::, import them instead, and Windows' spawn test hook goes throughsuper::tests.clicode uses takecfg(feature = "cli"). The tests import the names that they took frommod.rs's imports through their glob.crate::path. The moved links written withself#sectionorsuper::, which would now name the new modules (self#removalwould namestore::names, andsuper::launch::MAX_TIMEOUTwould namesupervisor::launchrather thanhost::launch), become references to definitions withcrate::paths, and the lines that they shorten take words from the lines below them, while the other lines keep their bytes. The module documentation ofstoreandsupervisorgets definitions after its last line, for the names that it resolved through the imports thatmod.rsdrops, and for thefn@links, so that the lines of their doctests, which name those tests, do not move. The rendered documentation does not change.pub(super)makes too long.Validation
I ran the checks on Windows 11 with Rust 1.95.0 and the 1.89 MSRV, against
devat2266fa59, at each commit, which a script checks out in turn:cargo public-api diffof rustdoc's JSON with all features (RUSTC_BOOTSTRAP=1 cargo rustdoc --lib --all-features -- -Z unstable-options --output-format json) forx86_64-pc-windows-msvcandx86_64-unknown-linux-gnufinds no difference fromdevat any commit.cargo test -- --liston Windows lists exactly the tests ofdevwith all features (1,322), with default features (1,085), and for the library without default features (270), doctests included, whose names carry their lines.--document-private-items, for both targets, every item of the crate keeps its path, naming the items of the new modules as their parent's (16,512 on Windows and 27,610 on Linux), and every intra-doc link keeps its target (2,856 and 3,893). The only documentation that changes is that of the link definitions above. rustdoc reports the same 13 and 15 warnings with private items as ondev.-D warningspasses for Windows and for Linux on all targets with all features and with default features, and on the library with and without default features.cargo checkpasses for macOS (aarch64-apple-darwin) and with Rust 1.89. At each split commit as I wrote it, Clippy also passed on all targets withcliand on the library with each ofcli,testing, andbundled, for Windows and Linux, and rustdoc with-D warningspassed.x86_64-unknown-linux-musl. At each split commit, the tests of the split module pass too: 28 ofhost::platformon Windows, 64 ofhost::storeand the 11 oftests/store.rs, 26 ofhost::supervisorand the 20 thattests/supervisor.rsruns, and the doctests of the store and the supervisor, whose names keep their lines.tests/host_modules.rspasses (22 tests) at each split commit and at the last.I compiled, linted, and documented the Linux code from Windows, but CI ran it. CI run 41158921792 at
e39976acpassed, the hypervisor-backed jobs included. Itsnvx-rsjobs ran the same tests as those ofdev's run 41155080692 atbad44022, whose only change tonvx-rssince this branch's base is in the body of a test ofcli::session. On Windows, they report the same 2,817 passed and 127 ignored tests. On Linux, the logs name the same tests the same 4,993 times, with none failed; the counts by result differ only where the output of tests that run their binary again as a child interleaves with the results.Coordination
Two pull requests that were opened while this one was in progress edit the platform modules that it splits, so whichever merges second conflicts on them. The resolution applies their changes to the files that now hold the same code; no other open pull request edits the files that this one splits.
detachandinherit_onlyinplatform/linux.rs, and changes nothing else there. Those functions move unchanged toplatform/linux/spawn.rs, where its doc comments apply as they are.unreadmethod. On Linux,ProcessHandle::bytes_read,own_bytes_read, andread_countbelong inplatform/linux/process.rs,UnixTransport::unreadinplatform/linux/endpoint.rs, and its test inplatform/linux/tests.rs. On Windows,read_transfer,own_bytes_read, andProcessHandle::bytes_readbelong inplatform/windows/process.rs, with the imports ofGetProcessIoCountersandIO_COUNTERS. Each platform'smod.rsthen re-exportsown_bytes_read, whichplatformre-exports to the crate. Its changes toplatform/mod.rsandplatform/other.rs, which this pull request does not split, apply as they are.