Link-time extern is the Standard path
Platform spec ADR
Link-time extern is the Standard path
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”Early engine prototypes resolved Extern(Library:…) via dlopen/dlsym. That complicates reproducible AOT artifacts and blurs security review of loaded code.
Decision
Section titled “Decision”| Track | Status |
|---|---|
| Link-time | Standard for v0.3 — addresses fixed before execution via C ABI profile |
Dynamic extern_dlopen | Proposed / legacy — engine feature only; not required for reference CLI |
| Validation | High-level Beskid types in extern signatures must be rejected before codegen |
| Syscalls | User externs must not embed OS syscall sequences — see Panic, IO, and syscalls |
Consequences
Section titled “Consequences”New platform work documents link-time flows first. Dynamic resolution stays gated behind extern_dlopen in beskid_engine.
Verification anchors
Section titled “Verification anchors”compiler/crates/beskid_analysis extern validation; beskid_engine link paths.