Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Interop.Contracts — Error and unwind semantics

Platform spec article

Interop.Contracts — Error and unwind semantics

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki
ShapeForeign expectationBeskid mapping
ValueNormal C returnPrimitive or interop view per profile
UnitvoidNo return value
NeverDoes not returnNever → trap/unwind per profile

Beskid Result types must not appear on FFI boundaries in v0.3.0. Authors map foreign error codes to Beskid Result after the call returns.

Across user FFI and export boundaries in v0.3 Standard:

  • Beskid panic must not rely on foreign callers catching Rust/Beskid unwinds.
  • The default policy is abort or trap at the boundary.
  • Runtime syscalls and selected runtime exports may use extern "C-unwind" internally; that class is not implied for user Extern or [Export] without an explicit future profile.

Foreign functions that communicate failure via return codes or errno remain the caller’s responsibility to translate; the platform does not inject automatic errno threading in v0.3.