Monolithic IO.bd hid syscall direction and descriptor typing.
Design model
Platform spec article
Design model
Spec standingStandard
-
stdin/stdout/stderr are separate runtime-backed modules.
Context
Decision
Rule Detail Surface System.Input,System.Output,System.Errorunderpackages/runtimeNon-goal Monolithic IO.bdfor standard streamsConsequences
Syscall descriptors stay typed per stream.
Verification anchors
packages/runtime/src/System/; stream contract tests. -
ANSI and terminal helpers live in corelib_console.
Context
Higher console work must not bloat runtime syscall modules.
Decision
Rule Detail Package compiler/corelib/packages/console(corelib_console)Runtime Streams stay in runtime package Consequences
Terminal features document against console package anchors.
Verification anchors
packages/console; pckg workspace publish. -
Runtime-backed surfaces require coordinated ABI bumps.
Context
Builtin shape changes break AOT/JIT link without version alignment.
Decision
Rule Detail Version beskid_runtime_abi_version/BESKID_RUNTIME_ABI_VERSIONmust matchChange Requires beskid_abi, runtime, and corelib updates togetherConsequences
Link failures surface at build time, not lazy dlopen.
Verification anchors
beskid_abi/src/builtins.rs;abi/contracts.rs. -
Foundation-style modules without builtins follow normal lowering.
Context
Not every corelib module is runtime-backed.
Decision
Rule Detail In scope Builtin/syscall facades documented here Out of scope Pure Beskid foundationmodulesConsequences
This feature does not duplicate language-meta semantics for pure libraries.
Verification anchors
foundation package compile tests.
- Contracts and edge cases Stability guarantees for runtime-backed corelib APIs.
- Design model Corelib APIs implemented by runtime builtins and ABI-stable syscall surfaces.
- Examples Examples of runtime-backed corelib surfaces.
- FAQ and troubleshooting FAQ for runtime-backed corelib surfaces.
- Flow and algorithm Call path from Beskid corelib methods to runtime builtins.
- Verification and traceability Verification for runtime-backed corelib surfaces.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose
Section titled “Purpose”Some corelib modules are thin Beskid facades over runtime builtins and OS syscalls (syscall_read, syscall_write in beskid_runtime). Higher-level console and ANSI behavior lives in corelib_console (compiler/corelib/packages/console), not monolithic IO.bd.
Layering
Section titled “Layering”flowchart TB App[User code] Corelib[System.* / corelib_console] Codegen[beskid_codegen calls] RT[beskid_runtime builtins] OS[Host syscalls] App --> Corelib --> Codegen --> RT --> OS
| Layer | Examples |
|---|---|
| Beskid surface | System.Input, System.Output, System.Error under packages/runtime/src/System/ |
| Console package | ANSI and terminal helpers in packages/console |
| Runtime module | alloc, fiber, channel, gc, panic_io in beskid_runtime/src/builtins/mod.rs |
| ABI catalog | beskid_abi/src/builtins.rs pins symbol names and signatures for AOT/JIT |
Stability contract
Section titled “Stability contract”Runtime-backed surfaces must keep ABI version alignment (beskid_runtime_abi_version, BESKID_RUNTIME_ABI_VERSION in AOT requests). Breaking builtin shapes requires coordinated bumps across:
beskid_abispecsbeskid_runtimeimplementations- corelib Beskid declarations and docs under
compiler/corelib/beskid_corelib/docs/
Language semantics (fiber scheduling, GC barriers) remain in language-meta and execution domains; this feature documents which corelib entry points are native.
Documentation sources
Section titled “Documentation sources”Trudoc-compatible prose lives beside Beskid sources in compiler/corelib/. Public site mirrors may appear under site/website/src/legacy-bridge/corelib/System/ for browsing.
Implementation anchors
Section titled “Implementation anchors”- Streams:
compiler/corelib/packages/runtime/src/System/ - Console:
compiler/corelib/packages/console/ - Runtime:
compiler/crates/beskid_runtime/src/builtins/ - ABI:
compiler/crates/beskid_abi/src/builtins.rs - Tests:
compiler/crates/beskid_tests/src/abi/contracts.rs