Expand description
WebUI FFI (Foreign Function Interface) for interoperability with other languages.
This crate provides C-compatible APIs for the WebUI handler to be used from languages like Go, C#, Python, etc.
Load a compiled protocol once with webui_protocol_create, then reuse the
handle with webui_handler_render and the other protocol operations.
§Error Handling
All functions that can fail return NULL on error. Call webui_last_error to
retrieve a human-readable error message. The error string is valid until the next
FFI call on the same thread (follows the POSIX dlerror() pattern).
Functions§
- webui_
free ⚠ - Free a string returned by a WebUI FFI function.
- webui_
handler_ create - Create a new WebUI handler instance.
- webui_
handler_ ⚠create_ with_ plugin - Create a new WebUI handler instance with a named plugin.
- webui_
handler_ ⚠destroy - Destroy a WebUI handler instance.
- webui_
handler_ ⚠render - Render using a protocol previously returned by
webui_protocol_create. - webui_
handler_ ⚠set_ nonce - Set the CSP nonce for inline
<script>tags on a handler instance. - webui_
last_ error - Return the last error message, or
NULLif no error has occurred. - webui_
protocol_ ⚠create - Decode and index a WebUI protocol for repeated rendering.
- webui_
protocol_ ⚠destroy - Destroy a loaded WebUI protocol handle.
- webui_
protocol_ ⚠render_ component_ templates - Render component templates using a loaded protocol handle.
- webui_
protocol_ ⚠render_ partial - Produce a complete partial response using a loaded protocol handle.
- webui_
protocol_ ⚠tokens - Extract CSS token names from a loaded protocol handle.
- webui_
streaming_ ⚠session_ boundary - Resolve an authored boundary name to a stable integer handle.
- webui_
streaming_ ⚠session_ boundary_ count - Return the number of compile-time boundaries declared by this entry.
- webui_
streaming_ ⚠session_ create - Open a host-driven progressive response for a streaming entry.
- webui_
streaming_ ⚠session_ destroy - Release a streaming session handle.
- webui_
streaming_ ⚠session_ finish - Render the document tail and emit the terminal record.
- webui_
streaming_ ⚠session_ is_ finished - Report whether the terminal record has been written.
- webui_
streaming_ ⚠session_ update - Push a projected state patch to a committed updatable boundary.
- webui_
streaming_ ⚠session_ write_ boundary - Render and commit the next boundary in declaration order.
- webui_
streaming_ ⚠session_ write_ shell - Render everything before the first boundary.
Type Aliases§
- webui_
protocol_ t - Opaque C handle for a loaded WebUI protocol.
- webui_
streaming_ session_ t - Opaque C handle for a host-driven progressive response.