rinf library
This module supports communication with Rust.
Classes
-
RustSignal<
T> -
This contains a message from Rust.
Optionally, a custom binary called
binary
can also be included. This type is generic, and the message can be of any type declared in Protobuf.
Functions
-
finalizeRust(
) → void - Terminates all Rust tasks by dropping the async runtime. Calling this function before closing the Flutter app can prevent potential resource leaks. Please note that on the web, this function does not have any effect, as tasks are managed by the JavaScript runtime, not Rust.
-
initializeRust(
AssignRustSignal assignRustSignal, {String? compiledLibPath}) → Future< void> -
Starts the
main
function in Rust. -
sendDartSignal(
int messageId, Uint8List messageBytes, Uint8List binary) → void - Sends a signal to Rust.