Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Guides

Practical guides for working with WeaveFFI bindings across targets.

  • The Rust Producer Macro: write safe Rust, annotate it with #[weaveffi::module], and let the weaveffi crate generate the C ABI glue.
  • Memory Ownership: allocation rules; freeing strings, bytes, structs, and errors across the FFI boundary.
  • Error Handling: the uniform error model and how each target surfaces failures.
  • Async Functions: IDL declaration, the C ABI callback contract, and per-target async surfaces.
  • Annotated Rust Extraction: extract an IDL from annotated Rust source instead of writing YAML by hand.
  • Generator Configuration: customize per-target names, module-prefix stripping, and the C ABI prefix via weaveffi.toml or inline generators: blocks.
  • Packaging and Distribution: assemble ready-to-publish packages that bundle prebuilt native libraries per platform.