Export/callback rules were scattered between runtime and language-meta drafts.
Export attribute
Platform spec article
Export attribute
Spec standingStandard
-
Beskid-to-foreign export authority.
Context
Decision
This feature hub must own normative MUST/SHOULD for Beskid export and callback registration (user interop).
Consequences
Distinct from runtime builtin exports on Rust ABI profile.
Verification anchors
/platform-spec/language-meta/interop/export-and-callbacks/
-
Export symbols are generated; builtins stay beskid_abi.
Context
Plugin authors confused generated exports with frozen JIT builtin tables.
Decision
User export symbols are generated from Beskid compilation units. Frozen runtime builtin exports remain on
beskid_abi/ Rust ABI profile — export-only work must not changeBESKID_RUNTIME_ABI_VERSION.Consequences
Codegen plans export metadata beside
ExternImport; trampolines use runtime TLS hooks.Verification anchors
/platform-spec/language-meta/interop/export-and-callbacks/ implementation anchors.
-
Contract vtables as Standard export remain out of scope.
Context
Embedding hosts need a minimal stable export surface before full vtable stories.
Decision
v0.3 Standard must support
[Export]onpubfunctions with FFI-permitted types. Exporting arbitrarycontractvtables as Standard is out of scope for v0.3.Consequences
Callback registration table protocol is Standard; foreign-thread entry without host contract is Proposed v0.3.2+.
Verification anchors
-
Normative text can lead reference compiler export support.
Context
v0.3 is spec-first for interop; codegen for export is still landing.
Decision
This feature is Standard in v0.3 specification. Reference compiler support may trail; verification article records gaps until codegen lands.
Consequences
Contributors implement against ADRs without downgrading spec status to Proposed.
Verification anchors
- Callback registration Host registration table protocol for Beskid exports invoked from foreign code (v0.3).
- Export attribute Normative Export metadata for pub functions exposed to foreign hosts (v0.3).
- Export and callbacks — Verification and traceability Conformance fixtures for Export and callback registration (v0.3).
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Placement
Section titled “Placement”Export applies to pub function definitions only in v0.3 Standard. Contract methods, types, and modules must not use Export until a future profile promotes contract vtables.
Attribute fields
Section titled “Attribute fields”| Field | Required | Meaning |
|---|---|---|
Abi | yes | "C" for v0.3 Standard |
Symbol | no | Exported linker symbol; default is the Beskid function name (unmangled) |
Example:
[Export(Abi:"C", Symbol:"beskid_plugin_init")]pub i64 plugin_init(i64 host_api_version) { return 0;}Permitted signatures
Section titled “Permitted signatures”Export functions must use the same type set as Extern import methods in v0.3.0 (interop view types).
Linkage
Section titled “Linkage”Exported symbols must be emitted with global linkage visible to the platform linker. The build driver must include Beskid-generated objects and the runtime static archive per backend docs.
Panics
Section titled “Panics”Panics in exported functions must be treated as non-returning traps across the boundary (error and unwind).