Skip to main content

Crate void_sdk_rust

Crate void_sdk_rust 

Source
Expand description

Void Rust SDK

This library provides helper macros and FFI boundaries to build stateful WebAssembly plugins in Rust for the Void framework runtime.

Macros§

void_plugin
Exports standard WebAssembly FFI functions (void_invoke, void_free_string, etc.) and invokes the user’s plugin registration function on initialization.

Enums§

Value
Represents any valid JSON value.

Functions§

ensure_registered
Verifies that user plugin registrations are fully initialized.
get_array
Extracts an Array parameter value from the arguments map.
get_bool
Extracts a boolean parameter value from the arguments map.
get_float
Extracts a 64-bit float parameter value from the arguments map.
get_int
Extracts a 64-bit integer parameter value from the arguments map.
get_null
Verifies that a field inside the map is a JSON Null type.
get_object
Extracts an Object parameter value from the arguments map.
get_string
Extracts a string parameter value from the arguments map.
get_value
Extracts a raw JSON Value parameter value from the arguments map.
register
Registers a function handler under a specific name inside the dynamic FFI registry.
void_free⚠
Frees allocated memory blocks on the WebAssembly heap. This is called internally by the Javascript Host to clean arguments.
void_free_string⚠
Frees returned output strings allocated on the heap. This is called by the Host loader once JSON responses are fully parsed.
void_invoke
Core FFI entrypoint invoked by the Host. Parses the JSON string input, executes the registered function, and returns the response pointer.
void_malloc⚠
Allocates memory block on the WebAssembly heap. This is called internally by the Javascript Host to pass inputs.

Type Aliases§

NativeFn
Registry type mapping function name to a function pointer. Developers write handlers matching this signature.