Runtime interop_dispatch builtins for tagged values
Platform spec ADR
Runtime interop_dispatch builtins for tagged values
Spec standingStandard
- Contracts and edge cases MUST rules for extern validation, dynamic linking policy, and interop dispatch layout.
- Design model Extern resolution layers, runtime dispatch builtins, and host policy boundaries.
- Examples Declaring Extern contracts, dynamic getpid smoke, and interop dispatch usage patterns.
- FAQ and troubleshooting Extern linking failures, dlopen policy, and interop dispatch debugging.
- Flow and algorithm Extern validation, link registration, optional dlopen resolution, and interop dispatch calls.
- Verification and traceability Engine extern tests, analysis diagnostics, and interop layout traceability.
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).
Context
Section titled “Context”Tagged interop values need runtime-known layout offsets. Per-site custom trampolines would fork ABI stability.
Decision
Section titled “Decision”| Builtin family | Role |
|---|---|
interop_dispatch_unit | Unit-tagged dispatch |
interop_dispatch_ptr | Pointer payloads |
interop_dispatch_usize | Scalar bridge |
| Layout stability | Offsets are versioned with ABI versioning |
| Implementation | beskid_runtime::interop exports registered in BUILTIN_SPECS |
Lowering must route approved tagged calls through these builtins rather than ad-hoc host calls.
Consequences
Section titled “Consequences”Interop layout changes require ABI bump or additive symbol policy per D-EXEC-ABI-0002.
Verification anchors
Section titled “Verification anchors”compiler/crates/beskid_runtime/src/interop/; interop lowering tests.