diff --git a/Cargo.toml b/Cargo.toml index 6e769c19d2a..f1405cf2d56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,6 @@ members = [ "lib/blackbox", "lib/blockhold", "lib/blockring", - "lib/blockring/transport", "lib/bootmap", "lib/crypto", "lib/device-memory", @@ -90,6 +89,7 @@ members = [ "sdk/std/copies", "sdk/osrelease", "sdk/toyos", + "sdk/transport", "sdk/window", "system/acpiserver", "system/acpiserver/aml", diff --git a/build/sdkversion.rs b/build/sdkversion.rs index 3e7fd470a67..22cb6d2ba0d 100644 --- a/build/sdkversion.rs +++ b/build/sdkversion.rs @@ -23,7 +23,7 @@ pub struct Crate { pub const PUBLISHED: &[Crate] = &[ Crate { name: "toyos-abi", dir: "sdk/abi" }, Crate { name: "toyos-untrusted", dir: "lib/untrusted" }, - Crate { name: "toyos-transport", dir: "lib/blockring/transport" }, + Crate { name: "toyos-transport", dir: "sdk/transport" }, Crate { name: "toyos-keymap", dir: "sdk/keymap" }, Crate { name: "toyos-font", dir: "sdk/font" }, Crate { name: "toyos", dir: "sdk/toyos" }, diff --git a/build/sysroot.rs b/build/sysroot.rs index 8339492a196..4932efe775f 100644 --- a/build/sysroot.rs +++ b/build/sysroot.rs @@ -71,7 +71,7 @@ use whole_toolchain::{whole, Whole}; pub const SYSROOT_SOURCES: [&str; 9] = [ "sdk/abi/src", "sdk/toyos/src", - "lib/blockring/transport/src", + "sdk/transport/src", "lib/untrusted/src", "sdk/std", "lib/elf/src", @@ -85,7 +85,7 @@ pub const SYSROOT_SOURCES: [&str; 9] = [ pub(crate) const SYSROOT_MANIFESTS: [&str; 9] = [ "sdk/abi/Cargo.toml", "sdk/toyos/Cargo.toml", - "lib/blockring/transport/Cargo.toml", + "sdk/transport/Cargo.toml", "lib/untrusted/Cargo.toml", "lib/elf/Cargo.toml", "sdk/osrelease/Cargo.toml", @@ -98,7 +98,7 @@ pub(crate) const SYSROOT_MANIFESTS: [&str; 9] = [ /// lockfile resolves with the fork's own through [`std_patch`]: what of a /// worktree can move a freestanding target's dependency versions. const STD_MANIFESTS: [&str; 4] = - ["sdk/abi/Cargo.toml", "sdk/toyos/Cargo.toml", "lib/blockring/transport/Cargo.toml", "lib/untrusted/Cargo.toml"]; + ["sdk/abi/Cargo.toml", "sdk/toyos/Cargo.toml", "sdk/transport/Cargo.toml", "lib/untrusted/Cargo.toml"]; /// One of the crates std names by version, in a worktree. pub(crate) struct StdCrate { @@ -1321,7 +1321,7 @@ pub(crate) mod tests { "--config".to_string(), format!("patch.crates-io.toyos.path=\"{at}/sdk/toyos\""), "--config".to_string(), - format!("patch.crates-io.toyos-transport.path=\"{at}/lib/blockring/transport\""), + format!("patch.crates-io.toyos-transport.path=\"{at}/sdk/transport\""), "--config".to_string(), format!("patch.crates-io.toyos-untrusted.path=\"{at}/lib/untrusted\""), ], diff --git a/build/toolchain.rs b/build/toolchain.rs index 6be72d48390..39aec9473cc 100644 --- a/build/toolchain.rs +++ b/build/toolchain.rs @@ -825,7 +825,7 @@ mod tests { let registry = |name: &str, version: &str| { format!("/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/{name}-{version}/src/lib.rs") }; - let rest = format!("{} {}", ours("lib/blockring/transport"), ours("lib/untrusted")); + let rest = format!("{} {}", ours("sdk/transport"), ours("lib/untrusted")); let built_from = |abi: &str, toyos: &str| { fs::write(built.join("dist/libstd.d"), format!("{}/dist/libstd.rlib: {abi} {toyos} {rest}\n", built.display())) .unwrap(); diff --git a/issues/loom-arc-panics-in-its-drop-while-a-failed-model-unwinds.md b/issues/loom-arc-panics-in-its-drop-while-a-failed-model-unwinds.md index 42b9beec917..e7eae7246fc 100644 --- a/issues/loom-arc-panics-in-its-drop-while-a-failed-model-unwinds.md +++ b/issues/loom-arc-panics-in-its-drop-while-a-failed-model-unwinds.md @@ -19,7 +19,7 @@ while `std::thread::panicking()`; its `Arc` does not. **Evidence** ([ToyOSOrg/evidence `29c8ebcb`, `arc-probe/`](https://github.com/ToyOSOrg/evidence/tree/29c8ebcb04eae318598ff7cb0a045e6e9a1c4f53/arc-probe)): at `6d2e78400`, with the stream model in -`lib/blockring/transport/tests/loom.rs` on `loom::sync::Arc` in place of +`sdk/transport/tests/loom.rs` on `loom::sync::Arc` in place of std's, `cargo test -p toyos-transport --features want-relaxed --test loom -- a_consumer_that_looked_again_is_rung_for_bytes_it_missed --exact` kills the test binary with SIGABRT, `panic in a destructor during cleanup`, through diff --git a/issues/netstack-moves-every-byte-through-two-kernel-pipes.md b/issues/netstack-moves-every-byte-through-two-kernel-pipes.md index a6e43f0693c..cfd14216169 100644 --- a/issues/netstack-moves-every-byte-through-two-kernel-pipes.md +++ b/issues/netstack-moves-every-byte-through-two-kernel-pipes.md @@ -52,7 +52,7 @@ The design and its roast are PR #863's body. `DeviceMemory`, and a receiver judges a lent region through `fstat` before it maps it. - Stage 2, done (PR #878): a byte ring with untrusted cursors and want words - in `toyos-transport` (`lib/blockring/transport`), host-tested and modelled + in `toyos-transport` (`sdk/transport`), host-tested and modelled in loom. - Stage 3, done (PR #905): a TCP stream, connected or accepted, is one region whose two rings are [tcp]'s buffers and the connection it was opened diff --git a/issues/the-transport-heads-orderings-have-no-oracle.md b/issues/the-transport-heads-orderings-have-no-oracle.md index 38878d463f1..0bd386bd3b2 100644 --- a/issues/the-transport-heads-orderings-have-no-oracle.md +++ b/issues/the-transport-heads-orderings-have-no-oracle.md @@ -8,7 +8,7 @@ opened: 2026-09-27 A consumer stores its head `Release` after it has loaded the entries below it, and a producer loads the head `Acquire` before it writes over them -(`lib/blockring/transport/src/queue.rs`, `Consumer::release` and `Producer::space`). +(`sdk/transport/src/queue.rs`, `Consumer::release` and `Producer::space`). No test reds if either is `Relaxed`: what the pair forbids is load buffering — a consumer's load of an entry reading the producer's later overwrite — which loom does not model, and every other test runs both ends on one thread. The diff --git a/lib/blockring/Cargo.toml b/lib/blockring/Cargo.toml index 1a49bbd54d8..f0f65fa972c 100644 --- a/lib/blockring/Cargo.toml +++ b/lib/blockring/Cargo.toml @@ -40,7 +40,7 @@ mutate-no-reissue-after-loss = [] # it today. toyos-blockhold = { path = "../blockhold" } # The rings on the session page. -toyos-transport = { path = "transport" } +toyos-transport = { path = "../../sdk/transport" } [lints.rust] warnings = "deny" diff --git a/sdk/toyos/Cargo.toml b/sdk/toyos/Cargo.toml index 57e4ad42683..ca94156bad5 100644 --- a/sdk/toyos/Cargo.toml +++ b/sdk/toyos/Cargo.toml @@ -29,4 +29,4 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("toyos") [dependencies] core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" } toyos-abi = { path = "../abi", default-features = false } -toyos-transport = { path = "../../lib/blockring/transport" } +toyos-transport = { path = "../transport" } diff --git a/lib/blockring/transport/Cargo.toml b/sdk/transport/Cargo.toml similarity index 98% rename from lib/blockring/transport/Cargo.toml rename to sdk/transport/Cargo.toml index 5f218ba0d09..3665df21744 100644 --- a/lib/blockring/transport/Cargo.toml +++ b/sdk/transport/Cargo.toml @@ -61,7 +61,7 @@ head-only = [] [dependencies] core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" } -toyos-untrusted = { path = "../../untrusted" } +toyos-untrusted = { path = "../../lib/untrusted" } [dev-dependencies] loom = "0.7" diff --git a/lib/blockring/transport/src/arena.rs b/sdk/transport/src/arena.rs similarity index 100% rename from lib/blockring/transport/src/arena.rs rename to sdk/transport/src/arena.rs diff --git a/lib/blockring/transport/src/inflight.rs b/sdk/transport/src/inflight.rs similarity index 100% rename from lib/blockring/transport/src/inflight.rs rename to sdk/transport/src/inflight.rs diff --git a/lib/blockring/transport/src/lib.rs b/sdk/transport/src/lib.rs similarity index 100% rename from lib/blockring/transport/src/lib.rs rename to sdk/transport/src/lib.rs diff --git a/lib/blockring/transport/src/queue.rs b/sdk/transport/src/queue.rs similarity index 100% rename from lib/blockring/transport/src/queue.rs rename to sdk/transport/src/queue.rs diff --git a/lib/blockring/transport/src/session.rs b/sdk/transport/src/session.rs similarity index 100% rename from lib/blockring/transport/src/session.rs rename to sdk/transport/src/session.rs diff --git a/lib/blockring/transport/src/stream.rs b/sdk/transport/src/stream.rs similarity index 100% rename from lib/blockring/transport/src/stream.rs rename to sdk/transport/src/stream.rs diff --git a/lib/blockring/transport/tests/loom.rs b/sdk/transport/tests/loom.rs similarity index 100% rename from lib/blockring/transport/tests/loom.rs rename to sdk/transport/tests/loom.rs diff --git a/system/netstack/Cargo.toml b/system/netstack/Cargo.toml index 55c5d1197b5..70b3399235e 100644 --- a/system/netstack/Cargo.toml +++ b/system/netstack/Cargo.toml @@ -24,7 +24,7 @@ toyos-net-shard = { path = "shard" } toyos-net-tcp = { path = "shard/tcp" } toyos-net-udp = { path = "udp" } toyos-net-wire = { path = "wire" } -toyos-transport = { path = "../../lib/blockring/transport" } +toyos-transport = { path = "../../sdk/transport" } [dev-dependencies] toyos-pci-claim = { path = "../../lib/pci-claim", features = ["host-grant"] } diff --git a/system/netstack/node/Cargo.toml b/system/netstack/node/Cargo.toml index 398973ee91b..bbb656a926a 100644 --- a/system/netstack/node/Cargo.toml +++ b/system/netstack/node/Cargo.toml @@ -20,7 +20,7 @@ toyos-net-udp = { path = "../udp" } toyos-net-wire = { path = "../wire" } # The stream protocol's one declaration, the region's layout, and the session's server end. toyos = { path = "../../../sdk/toyos" } -toyos-transport = { path = "../../../lib/blockring/transport" } +toyos-transport = { path = "../../../sdk/transport" } [dev-dependencies] # The outside reader of every frame the node emits: a published Ethernet, ARP,