# cbindgen config — generates include/wai.h from the FFI surface in # src/ffi.rs and the public constants in src/lib.rs. The header is # committed so SDK consumers can browse without building the crate. language = "C" include_guard = "WAI_H" pragma_once = true cpp_compat = true documentation = true documentation_style = "doxy" header = """ /* * WAI — Web AI media transport + execution. * * Auto-generated by cbindgen from src/ffi.rs. DO NOT EDIT — regenerate * by rebuilding `wai-rs` (the build.rs runs cbindgen) or by running * cbindgen --config cbindgen.toml --crate wai --output include/wai.h * * SDK contract: * - Every `wai_*` function returns a `wai_status_t` (typedef int). * 0 = ok; non-zero = see WAI_ERR_* below + wai_last_error(). * - Any `WaiBuffer` written into an out parameter MUST be freed via * `wai_buffer_free`. Passing a zero-cap buffer to free is safe. * - `wai_last_error()` returns a NUL-terminated UTF-8 string that is * valid until the next wai_* call on the same thread. * * Build the library: * cargo build --release # produces libwai.{so,dylib,a} * Link with: * gcc your.c -lwai # static or dynamic per linker */ """ [parse] parse_deps = false [export] prefix = "" # Only export items whose names start with `wai_` or `WAI_` — keeps # internal helpers out of the public C surface. [export.rename] "WaiBuffer" = "wai_buffer_t" "WaiDecoded" = "wai_decoded_t" "WaiIntDeclared" = "wai_int_declared_t" [fn] prefix = "" [enum] prefix_with_name = false