Expand description
Shared C-FFI consumer scaffolding for language backends.
This module provides utilities for generating language bindings that consume the C FFI layer produced by cbindgen. Each consumer backend (Go, Java, C#, Zig) uses the same C interface:
- A C header file (
config.ffi_header_name()) - A library name (
config.ffi_lib_name()) - A symbol prefix (
config.ffi_prefix()) - Standard helper symbols:
{prefix}_free_string,{prefix}_last_error_code,{prefix}_last_error_context
Structs§
- CConsumer
Context - Context capturing the shared FFI consumer inputs across all language backends.
Functions§
- default_
output_ dir - Resolve the per-backend output directory for generated files.
- free_
string_ symbol - Return the C symbol name for freeing FFI-allocated strings.
- last_
error_ code_ symbol - Return the C symbol name for reading the thread-local last error code.
- last_
error_ context_ symbol - Return the C symbol name for reading the thread-local last error context message.