native_sink (feature native_sink): what a native host's player integration runs for one playback session. It verifies a media playlist against its playlist receipt and the chain of its live revisions (http-delivery §8.6), holds a WAI object to the content hash its name or fragment states and a fragment named by its SHA-256 to that name (packaging §7.6), and answers per object whether the host may hand it to its decoder. It signs what stream-audit has a player sign, under a fresh session key: settlement acknowledgements by plain SHA-256, presentation claims for marked ads, the session record, and the bundle. And it ends a session nobody can see, or whose viewer has gone idle. ffi_sink: the C ABI over it, an opaque wai_sink_t with JSON in and JSON or bytes out, include/wai.h regenerated. The corpus live-conformance/native-sink/ is written from fixed seeds over the reference package's floor fragments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
51 lines
1.5 KiB
TOML
51 lines
1.5 KiB
TOML
# 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"
|
|
"WaiSink" = "wai_sink_t"
|
|
|
|
[fn]
|
|
prefix = ""
|
|
|
|
[enum]
|
|
prefix_with_name = false
|