Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

FFI and extern — Verification and traceability

Platform spec article

FFI and extern — Verification and traceability

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

v0.3 FFI is normative in platform-spec before the reference compiler fully implements link-time binding, interop views, and export/callback registration.

Toolchains conform to this feature when:

  1. Parse and analysis fixtures accept valid v0.3 extern/export syntax and emit expected diagnostics for invalid forms.
  2. Codegen extraction tests record stable ExternImport / export metadata from fixtures (where implemented).
  3. Runtime e2e tests for link-time foreign calls may be marked #[ignore] with reason v0.3 FFI impl until the engine/CLI path lands.
Contract clauseVerification anchor
Extern on contract onlybeskid_tests analysis E1510
Abi:"C" + Librarybeskid_tests extern validation pipeline
Interop view typesType fixtures + lowering signature scan (validate_ffi_signature)
Link-time librariesManifest contract tests + future CLI import tests
Export / callbacksDedicated fixtures under export-and-callbacks hub

Tests for RUNTIME_EXPORT_SYMBOLS and BESKID_RUNTIME_ABI_VERSION remain under beskid_tests/src/abi/contracts.rs. User FFI layout versioning must not bump the runtime ABI version unless a runtime export symbol changes.

Any behavior change in this area must update platform-spec text and add or adjust tests in the same change so the specification stays executable.