Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

C ABI profile — Extern contracts and linking

Platform spec article

C ABI profile — Extern contracts and linking

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

User foreign entrypoints are declared on contract types using the Extern attribute (see FFI and extern). The C ABI profile interprets attribute fields as:

  • Abi — in current toolchains, "C" is the supported user-facing choice for this profile; other strings are reserved.
  • Library — shared object or loadable module path semantics as implemented by the engine when dynamic resolution is enabled.

Implementation references: ExternImport in compiler/crates/beskid_codegen/src/lowering/context.rs and collection in compiler/crates/beskid_codegen/src/lowering/lowerable.rs.

User Extern symbols must be satisfied at link time via project link metadata and driver inputs. See link-time linking and foreign library import.

Artifacts with unresolved imports must fail before run with diagnostics listing (library, symbol) pairs.

Runtime dlopen / dlsym is documented under dynamic resolution profile (Proposed). It must not be described as the default path in v0.3 platform-spec.

Object emission paths must surface the same import set for a given artifact; unresolved symbols must fail at link time with parity between JIT link drivers and AOT link steps.