Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

C ABI profile — Types and call conventions

Platform spec article

C ABI profile — Types and call conventions

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

For user contract calls lowered through the reference compiler path, parameters and returns are prepared for System V AMD64 when targeting that platform. This matches the explicit CallConv::SystemV selection in the contract call lowering implementation.

Other targets must document their own mapping in a future revision of this article; until then, only the documented tier-1 mapping is normative for Standard conformance claims.

The C ABI profile instantiates Interop.Contracts as follows:

  • Scalarbool as i8, u8, i32, i64, f64, unit.
  • Interop viewsCStringView, CBuffer, CArrayView per interop view types.
  • Opaque handle — pointer-sized slot or i64 where documented.
  • ref u8 — narrow legacy slice start; prefer CBuffer.

Beskid string and T[] GC values must not appear on user Extern signatures in v0.3.0 Standard.

CLayout structs (primitive fields only) are v0.3.1C layout types. Nested complex types are deferred until basic FFI is implemented.

Types with unstable Beskid-only layout must not cross the boundary without an adapter or shim.

Beskid user code and bridge code are lowered with Cranelift; foreign libraries need only expose C ABI entrypoints compatible with the emitted calls. See also /execution/runtime/ffi/ for additional lowering narrative.