Repository navigation
Crate vyrn cut
Path: crates/engine/vyrn-cut · Layer 1 (11 §1.4) · Pinned: yes (11 §1.3)
vyrn-cut holds every cross-core primitive of the engine: the lane counters, the cut publication (two half-cut lines, one per cut core), the snapshot seqlock, LaneCut, the SPSC and multi-reader rings, and the pool primitives. Everything except the pool read-modify-writes goes through a Visibility backend: Hw uses atomics, and Sim adds seeded delays so vyrn-sim sees stale cuts and snapshots. Each primitive's doc names its writer, its readers, its memory orderings and its spec section. Every line that one core writes and another reads is aligned to SHARED_ALIGN = 128 bytes.
- 11 §1.3 (crate scope), 11 §3.6 (
BLD_SHARED_ALIGN), 11 §6.4 (Simvisibility), 11 §6.1 (loom models) - 01 §14.3: two half-cut lines, cut core A (core 1) and B (core 6)
- 01 §14.5: per-lane order rings, lane → stream core
- 01 §14.15: pool primitives (
PoolTokCAS, steal locks, sibling-segmentfetch_and) - 05 §4.6 (
Segment16.mask), §4.12 and §4.15 (ring entry lines), §4.13 and §7.1 (cut publication), §6.9 (pool), §16 (ring capacities)
| Type | Role |
|---|---|
Ring<T, N, C, V>, Producer, Consumer
|
Ring of N entries with C ≥ 1 consumers; one writer of slots and tail, each consumer the only writer of its head |
FwdRing, FillRing, OsRing, StepLog, TxRing
|
Aliases for lane → BBO, BBO → lane, lane → stream core, BBO → stream and TX cores (5 readers), BBO → one fill TX core |
HalfCut, CutWriter
|
CutPub[h], one per half, read by the BBO; the cut core's private publication state |
CounterLine, SnapshotLine, LaneCut, BboFloor
|
Published single-writer lines (lane counter, BBO snapshot, per-lane cut, floor) |
PubRing, Published
|
Seqlocked publication ring and single-line publication |
PoolTok, StealLock, SegMask
|
Pooled-account token (CAS), RX-queue consumer lock, Segment16.mask word |
Visibility, Hw, Sim
|
Store-visibility backend trait; hardware atomics; the simulator's seeded backend |
Implemented. Version 0.1.0 from the workspace; publish = false. The crate docs name no missing piece or follow-up. ring is the only module allowed to contain unsafe (listed in UNSAFE.toml); the rest of the crate is #![deny(unsafe_code)].
Tests: tests/conformance.rs (11 #[test]), tests/props.rs (9, proptest), tests/ring.rs (5), tests/loom.rs (7), and unit tests in src/pool.rs (5). Total: 37 #[test] functions. The loom file is #![cfg(loom)]: its 7 models (ring, seqlock, cut publication, pool primitives, preemption bound 3) run only with RUSTFLAGS="--cfg loom" cargo test -p vyrn-cut --test loom --release. build.rs only declares the loom cfg. vyrn-cut is the only crate with loom as a dev-dependency.
Workspace: vyrn-types. Dev: loom, proptest. This matches 11 §1.4 (layer 1 → vyrn-types).
- Source: crates/engine/vyrn-cut
- Spec: Spec-05-Engine, Spec-01-Conventions, Spec-11-Build
- Related: Crate-vyrn-lane, Crate-vyrn-bbo, Crate-vyrn-engine, Crate-vyrn-sim
Overview
Working on VYRN
Spec
- 00 Index
- 01 Conventions
- 02 Requirements
- 03 Architecture
- 04 Protocol
- 05 Engine
- 06 Platform
- 07 Replication
- 08 Epochs
- 09 Chain
- 10 Accounts, Risk, MD
- 11 Build
- 12 Commitment
- 13 Availability
- 14 Envelope
Engine crates
Other crates
- vyrn-nic
- vyrn-log
- vyrn-data
- vyrn-consensus
- vyrn-replica
- vyrn-epoch
- vyrn-chain
- vyrn-md
- vyrn-sim
- vyrn-bench
Binaries
- vyrn-seq (stub)
- vyrn-validator (stub)
- vyrn-admin
Outside Rust
Reflects main at a9f0d61.