WAI is a container + capability-dispatch standard for media. It does not re-implement codecs; it dispatches to SOTA standard libraries (PNG, FLAC, zstd as the mandatory floor; AVIF, JPEG-XL, Opus, AV1, XZ as the recommended modern set) and adds an envelope that lets a neural shared-prior path coexist with the model-free floor. The capability a file requires is named, not supplied. Two paths open every conforming file: the neural condition (sink regenerates from a shared ambient prior) and the zeroth condition (registered SOTA codec menu). Apache-2.0. Adds: - wai/SPEC.md — WAI v1.0 spec (envelope, manifest, capability dispatch, registered capabilities including v1.1 multi-rendition extension) - wai/wai-rs/ — Rust reference implementation: lib + cdylib + staticlib, C FFI, 11 capability + envelope round-trip tests passing - wai/wai-web/ — wasm-bindgen wrapper for browser sinks - wai/wai-neural/ — Python tooling for neural-condition models - wai/tools/ — codec export + encode helpers (Python) - wai/corpus/CORPUS.md — third-party test corpus reacquisition guide Updates README.md to list four standards instead of three. Known consumer: CommunicationOS uses WAI for media transport over MoQT/MLS sessions. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
48 lines
1.5 KiB
TOML
48 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"
|
|
|
|
[fn]
|
|
prefix = ""
|
|
|
|
[enum]
|
|
prefix_with_name = false
|