build.rs handed cbindgen the whole crate, so the committed header carried every public constant of every module as a macro (F, S and A; CREATE and DELETE several times over) and an opaque typedef for each type one belongs to (Fx, Isa, Plant, PowerSource, Reason, Voice). It now hands it the four files of the C interface, src/ffi.rs, ffi_codecs.rs, ffi_neural.rs and ffi_sink.rs, and nothing else: the header declares the wai_* functions, the WAI_* constants and the wai_*_t types, and none of its wai_*/WAI_* declarations changed. The 102 removals wai breaking reports are acknowledged in the change's entry. wai/quickstart/libwai_interface.py holds the committed header to that on every change (a step of the repository checks): every macro WAI_*, every type wai_*, a declaration for each export of the four files and no other. The release's libwai build runs it too, with the library's symbols. Co-Authored-By: Claude Opus 5.5 <[email protected]>
40 lines
3.3 KiB
Markdown
40 lines
3.3 KiB
Markdown
### wai.h holds the C interface alone
|
|
|
|
- **`wai-rs/include/wai.h`**: `build.rs` hands cbindgen the four files of the C interface,
|
|
`src/ffi.rs`, `src/ffi_codecs.rs`, `src/ffi_neural.rs` and `src/ffi_sink.rs`, and nothing else of
|
|
the crate, so the header declares the `wai_*` functions, the `WAI_*` constants and the `wai_*_t`
|
|
types those files define, and nothing more. Read from the whole crate, it carried every public
|
|
constant of every module as a macro, some names several times over with one value each, and an
|
|
opaque typedef for each type such a constant belongs to. No `wai_*` or `WAI_*` declaration
|
|
changed. `quickstart/libwai_interface.py`, run with the repository checks, holds the committed
|
|
header to that: every macro `WAI_*`, every type `wai_*`, a declaration for each export of the four
|
|
files and none other.
|
|
- **Breaking:** the header no longer declares the crate's other constants and types, none of which
|
|
the C interface takes or returns; a C program that named one gave its own meaning to an internal
|
|
value, and states the number it needs itself: `api:c:A`, `api:c:ADD_FIXED`, `api:c:ADD_INT`,
|
|
`api:c:AUDIO_DECODED_MAX_SAMPLES`, `api:c:AV1_DECODE_DEFAULT_MAX_LEN`, `api:c:CHAIN_HELD_LINKS`,
|
|
`api:c:CLIP_FRAMES`, `api:c:CLIP_SIDE`, `api:c:CREATE`, `api:c:CREATE_MEMBER`,
|
|
`api:c:CREATE_PARTICLE`, `api:c:DELETE`, `api:c:F`, `api:c:Fx_FRAC_BITS`, `api:c:HEAD`,
|
|
`api:c:HeadProof_FIXED_LEN`, `api:c:HeadProof_MAX_CV`, `api:c:IMAGE_MAX_PIXELS`,
|
|
`api:c:IMAGE_MAX_SIDE`, `api:c:IMPULSE`, `api:c:LoadedSets_DEFAULT_BUDGET`,
|
|
`api:c:LoadedSets_INDEX_BYTES_PER_ENTRY`, `api:c:MANIFEST_MAX_LEN`, `api:c:MANIFEST_MAX_VALUES`,
|
|
`api:c:MARKER_EOC`, `api:c:MARKER_PIH`, `api:c:MARKER_RDI`, `api:c:MARKER_SOC`,
|
|
`api:c:MARKER_SOQ`, `api:c:MARKER_SORP`, `api:c:MARKER_SORS`, `api:c:MARKER_SOZ`,
|
|
`api:c:MARKER_TON`, `api:c:MARKER_UDI`, `api:c:MAX_CAPS`, `api:c:MAX_EMBEDDED`,
|
|
`api:c:MAX_EVIDENCE`, `api:c:MAX_PERIODS`, `api:c:MAX_STEPS`, `api:c:MAX_STRING`,
|
|
`api:c:MAX_TRACKS`, `api:c:MUT_ACTION`, `api:c:NOISE`, `api:c:PERIOD_MAX_LAG`,
|
|
`api:c:PERIOD_MEDIANS`, `api:c:PERIOD_SAMPLE`, `api:c:PERIOD_Z`, `api:c:PIECE_KIND_NONE`,
|
|
`api:c:PROB_FRAC`, `api:c:PULSE25`, `api:c:PULSE25_BL`, `api:c:REGISTER_DELTA_UNCERTAINTY_UJ`,
|
|
`api:c:RENDER_MAX_FRAMES`, `api:c:RENDER_MAX_SAMPLES`, `api:c:RESOLUTION_FLOOR_UJ_PPM`,
|
|
`api:c:RESOLUTION_UNCERTAINTY_UJ`, `api:c:S`, `api:c:SAW`, `api:c:SAW_BL`, `api:c:SCALE_FRAC`,
|
|
`api:c:SCAN`, `api:c:SECTION_ASSETS`, `api:c:SECTION_CONTRACT`, `api:c:SECTION_GRAPH`,
|
|
`api:c:SECTION_OPLOG`, `api:c:SECTION_SEAL`, `api:c:SEGMENT_SAMPLES`, `api:c:SET_CELL`,
|
|
`api:c:SET_POS`, `api:c:SET_ROTATION`, `api:c:SET_SCALAR`, `api:c:SET_SCALE`, `api:c:SET_SIDE`,
|
|
`api:c:SET_SIZE`, `api:c:SET_TRANSLATION`, `api:c:SINE`, `api:c:SQUARE`, `api:c:SQUARE_BL`,
|
|
`api:c:TEXT_DECODED_MAX_LEN`, `api:c:TEXT_WINDOW_MAX_LEN`, `api:c:TEXT_WINDOW_MAX_LOG`,
|
|
`api:c:TRIANGLE`, `api:c:TRITS_PER_BYTE`, `api:c:UNIFORM_SUM`, `api:c:VIDEO_MAX_TEMPORAL_UNITS`,
|
|
`api:c:VOICE_BYTES`, `api:c:Voice_MAX_CURVE`, `api:c:Voice_MAX_ECHO_DELAY`,
|
|
`api:c:Voice_MAX_POLES`, `api:c:Voice_MAX_TAPS`, `api:c:WEFT_ADMITTED_MODES`,
|
|
`api:c:WEFT_LAST_ALLOCATED_MODE`, `api:c:WEFT_MODE_FLOAT_TENSOR`, `api:c:WEFT_MODE_RAW`,
|
|
`api:c:WEFT_MODE_TENSOR`, `api:c:WINDOW`; and the opaque types `api:c:Fx`, `api:c:Isa`,
|
|
`api:c:Plant`, `api:c:PowerSource`, `api:c:Reason`, `api:c:Voice`.
|