Guides
Practical guides for working with WeaveFFI bindings across targets.
- The Rust Producer Macro: write safe Rust, annotate it with
#[weaveffi::module], and let theweavefficrate 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.tomlor inlinegenerators:blocks. - Packaging and Distribution: assemble ready-to-publish packages that bundle prebuilt native libraries per platform.