Architecture overview (ByteOr OSS)
ByteOr is an OSS pipeline/runtime substrate. The workspace is intentionally split so the deterministic spec model, hot-loop kernel, SHM transport, and executor layers can evolve with auditable boundaries.
Layering
byteor-abi- C-facing
repr(C)layouts and the generatedspec/byteor_v1.hheader. - This is the ABI source of truth for exported ByteOr layouts.
- C-facing
byteor-pipeline-spec- The spec contract crate.
- Owns the v1 data model, validation,
kvencode/decode, canonicalization, and human-readable describe helpers.
byteor-pipeline-plan- Model-neutral authoring surface.
- Owns plan validation, execution target selection, and author-intent structures shared by OSS, WASM, and Cloud.
byteor-pipeline-lower- Explicit lowering from
PipelinePlanV2intoPipelineSpecV1::{SingleRing,LaneGraph}. - Reports plan diagnostics separately from lowering diagnostics.
- Explicit lowering from
byteor-pipeline-kernel- Hot-path lane traits, barriers, sequencing, and wait primitives.
- Contains no product policy.
byteor-transport-shm- File-backed shared-memory transport/open-create-validate layer.
byteor-pipeline-backings-mem- In-memory backings for tests, deterministic examples, and non-SHM paths.
byteor-pipeline-backings-shm- SHM-backed lane implementations and attach/create helpers.
byteor-pipeline-exec- In-process executors and runtime bring-up helpers.
- Validates specs before running and stays free of product policy.
byteor-pipeline- Facade crate that re-exports the main OSS authoring/runtime surface.
byteor-pipeline-wasm- Browser-facing bindings around spec authoring/validation and format conversion.
xtask- Workspace automation for CI gates, header generation, perf, fuzz, soak, and policy checks.
Two v1 spec shapes
ByteOr v1 intentionally has two different authoring/runtime shapes:
PipelineSpecV1::SingleRing- Explicit stage DAG over one sequenced ring.
- Used for bring-up, bounded runs, sharded per-key execution, and microbench-style paths.
PipelineSpecV1::LaneGraph- Whole-plant graph over named lanes, endpoints, and roles.
- Used when the topology needs fanout, merge, bridges, explicit endpoint wiring, or role-based MP execution.
The supported OSS authoring path is plan then explicit lowering. Callers that already know the
exact canonical shape may still author specs directly with byteor-pipeline-spec builders.
Data and control flow
At a high level, ByteOr follows this sequence:
- Author a
PipelinePlanV2or construct aPipelineSpecV1directly when appropriate - Validate the plan with
byteor-pipeline-plan::validate_plan_v2when using the planning path - Lower explicitly with
byteor-pipeline-lower - Validate the resulting spec with
byteor-pipeline-spec::validate_v1 - Attach or create the required backings
- Run an executor from
byteor-pipeline-exec - Observe runtime health through snapshots/counters exposed by the backing/executor layer
This separation matters because the OSS workspace treats the spec model as the stable contract and treats convenience helpers as secondary.
IndexBus dependency
Today the ByteOr OSS workspace still expects an indexbus checkout at ../indexbus.
- Several crates and
xtaskuse sibling path dependencies. - The generated ByteOr header includes
indexbus_v1.h. - CI checks out both workspaces side-by-side to satisfy those dependencies.
This dependency is part of the current initial-commit reality and should be treated as a workspace assumption until the path dependencies are removed.