Monolithic IO.bd hid syscall direction and descriptor typing.
Contracts and edge cases
Platform spec article
Contracts and edge cases
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).
Contracts
Section titled “Contracts”- ABI version lockstep — Host, runtime, and AOT artifacts must agree on
beskid_runtime_abi_versionfor a given toolchain release. - No duplicate syscall paths — Console/ANSI must not bypass
System.*stream contracts for primitive read/write. - Panic across unwind — Builtin entry points use
extern "C-unwind"; Beskid panics map throughpanic_iowithout corrupting GC state. - Documented nullability — Beskid wrappers must mirror ABI nullability for handles passed into GC-aware builtins.
Edge cases
Section titled “Edge cases”| Case | Behavior |
|---|---|
| Missing runtime on link | AOT/JIT link fails at build time, not lazy runtime dlopen |
| Platform without ANSI | Console package degrades per terminal capability probes |
| Embedded hosts without stderr | System.Error may alias output; documented per execution profile |
| Metrics feature gate | beskid_runtime metrics builtins compile only with metrics feature |
Non-runtime corelib
Section titled “Non-runtime corelib”Pure Beskid modules in foundation and similar packages are out of scope here—they follow standard IL lowering without builtin tables.