21. FFI and other forbidden friendships
Interop with C, Rust ABI profiles, extern, and callbacks—when you must talk to the outside world.
FFI and other forbidden friendships
FFI is where languages go to die. Beskid separates language interop law (language-meta) from host dispatch (execution ABI) so you know which spec page to argue about.
What you will find here
Section titled “What you will find here”| Section | Topic |
|---|---|
| Interop overview | Domain map and profiles. |
| FFI and extern | extern and contract imports. |
| C ABI profile | Link-time and dynamic resolution. |
| Rust ABI profile | Boundary stability (not “import any crate”). |
| Export and callbacks | Hosting Beskid from native code. |
flowchart LR bd[Beskid code] --> extern[extern / import] extern --> cabi[C ABI profile] extern --> rabi[Rust ABI profile] cabi --> native[Native library] rabi --> shims[Runtime shims]