Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

C ABI profile

Platform spec feature

C ABI profile

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

What this feature specifies

The C ABI profile is the normative mapping from Interop.Contracts primitives to C-compatible foreign libraries on tier-1 hosts. v0.3 Standard conformance uses link-time binding (link-time linking), interop view types (interop view types), and System V AMD64 for the reference compiler path.

Dynamic resolution (dlopen / dlsym) is a Proposed appendix only (dynamic resolution profile). WinAPI is out of scope for stdlib Standard (platform tier matrix).

Lowering uses Cranelift; foreign libraries need only expose C ABI entrypoints compatible with emitted calls.

v0.3 delivery bands

BandContentStatus
v0.3.0Interop views, link-time import, symbol overridesStandard (spec); impl may trail
v0.3.1CLayout primitive structsProposed
LaterNested FFI structs, enum ABI, foreign-thread entryPlanned after basic FFI

Implementation anchors

  • Extern import metadata: compiler/crates/beskid_codegen/src/lowering/context.rs (ExternImport)
  • Collection: compiler/crates/beskid_codegen/src/lowering/lowerable.rs
  • Contract calls: compiler/crates/beskid_codegen/src/lowering/expressions/call_expression.rs
  • Signature validation: compiler/crates/beskid_codegen/src/cranelift_host.rs
  • Legacy dynamic resolution: compiler/crates/beskid_engine/src/engine.rs (extern_dlopen, Proposed)
  • Stable view layouts (embedding): compiler/crates/beskid_abi/src/types.rs

No open decisions. Closed choices are normative ADRs under adr/ (D-LMETA-CABI-0001D-LMETA-CABI-0005); use the reader ADRs tab for detail.

Articles