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.
Type Aliases§
- webui_
protocol_ t - Opaque C handle for a loaded WebUI protocol.