Stdlib module ffi/ffi.vitl

This page is a wiki-style reference for one concrete stdlib file. It explains what the file owns, where it fits in the family, and how to decide whether this is the right surface to depend on.

Visual portrait of ffi/ffi.vitl
Wiki-style portrait for ffi/ffi.vitl.

Family: ffi

Kind: public stdlib surface

Page style: this reference follows the same “encyclopedic card + portrait + usage contract” logic as the keyword pages, but for stdlib modules.

Summary

Overview

FieldValue
Pathffi/ffi.vitl
Familyffi
Kindpublic stdlib surface
Line count381
Declared procedures16
Declared forms/picks7

`ffi/ffi.vitl` is a public stdlib surface inside the `ffi` family. It should be read as one focused slice of the broader family responsibility: ABI and foreign-function boundaries used when Vitte code must cross language or runtime edges.

Purpose

This file should be chosen because of responsibility, not because its name “sounds close enough”. Inside the ffi family, it carries one focused part of the contract and keeps that responsibility separate from neighboring concerns.

  • A system integration module can expose a narrow ABI-facing wrapper while the rest of the program stays pure.
  • A runtime boundary should say exactly when the library stops and the foreign surface begins.

Top-level API inventory

SurfaceItems
Proceduresffi_load_library, ffi_get_stdlib, ffi_register_function, ffi_call, ffi_call_str, ffi_call_f64, ffi_unload_library, math_lib_load, stdio_lib_load, strlib_load, pthread_lib_load, callback_create
FormsForeignFunction, ForeignLibrary, MathLib, StdioLib, StrlibLib, PthreadLib, Callback
Picksnone declared at top level
Constantsnone declared at top level

Imported surfaces

  • vitte/stdlib/ffi/abi // FFI

How to use this module

Start by reading the file as an ownership boundary. Ask three questions: what enters this module, what stable types or procedures it exports, and what adjacent module should stay outside of it.

  1. Open the family page first to understand why this area of the stdlib exists.
  2. Read the source excerpt below to see the namespace, imports, and first declared surfaces.
  3. Check the neighbor list to avoid coupling this module with an adjacent responsibility by habit.

Source shape

space vitte/stdlib/ffi/ffi
use vitte/stdlib/ffi/abi
// FFI - Foreign Function Interface
// Enables calling C and other native libraries
form ForeignFunction {
  name: string,
  lib_name: string,
  arg_types: [string],      // Type signatures
  return_type: string,
  calling_convention: string, // "cdecl", "stdcall", etc.

The excerpt is not meant to replace the file. It exists to make the module recognizable at first glance, the same way a Wikipedia infobox helps the reader orient before reading the whole article.

Integration boundaries

Within ffi, this file should remain focused. If a future helper changes the host boundary, scheduling boundary, or data-shape boundary, it probably belongs in a neighbor module instead of being added here by convenience.

  • Family responsibility: ABI and foreign-function boundaries used when Vitte code must cross language or runtime edges.
  • Family architecture role: Use `ffi` only when the program really needs a foreign boundary. This family should make coupling visible instead of hiding it.

Neighbor modules