Expand description
FFI Layer - Multi-language SDK Support
This module provides a C-compatible Foreign Function Interface (FFI) that enables the web server abstraction to be used from other programming languages.
Structs§
- FfiContext
 - FFI context for managing server instances and state
 - Python
Server Handle  - Python bindings helper structures
 
Constants§
- FFI_
ERROR_ INTERNAL  - FFI_
ERROR_ INVALID_ ARGUMENT  - FFI_
ERROR_ NULL_ POINTER  - FFI_
ERROR_ SERVER_ NOT_ FOUND  - FFI_
SUCCESS  - C-compatible result codes
 
Functions§
- generate_
c_ header  - Generate C header file content for FFI bindings
 - save_
c_ header  - Save C header to file
 - ws_
add_ ⚠route  - Add a route to the server Returns FFI_SUCCESS on success, negative value on error
 - ws_
bind_ ⚠server  - Bind server to an address Returns FFI_SUCCESS on success, negative value on error
 - ws_
create_ ⚠go_ server  - Go bindings helper - create server with Go-style error handling
 - ws_
create_ nodejs_ server  - Node.js bindings helper - create server with callback support
 - ws_
create_ python_ server  - Create Python-compatible server handle
 - ws_
create_ server  - Create a new web server instance Returns server ID on success, negative value on error
 - ws_
destroy_ server  - Destroy a server instance Returns FFI_SUCCESS on success, negative value on error
 - ws_
ffi_ cleanup  - Cleanup the FFI library (call at program exit)
 - ws_
ffi_ init  - Initialize the FFI library Returns FFI_SUCCESS on success
 - ws_
free_ ⚠string  - Free a string allocated by the FFI
 - ws_
get_ last_ error  - Get the last error message Returns pointer to error string (caller must free with ws_free_string) Returns null if no error
 - ws_
get_ version  - Get library version Returns pointer to version string (caller must free with ws_free_string)
 - ws_
is_ server_ running  - Check if server is running Returns 1 if running, 0 if not running, negative value on error
 - ws_
start_ server  - Start the server Returns FFI_SUCCESS on success, negative value on error
 - ws_
stop_ server  - Stop the server Returns FFI_SUCCESS on success, negative value on error