rinf library
This module supports communication with Rust.
Classes
-
RustSignalPack<
T> -
This contains a message from Rust.
Optionally, a custom binary called
binarycan also be included.
Functions
-
finalizeRust(
) → void - Terminates all Rust tasks by dropping the async runtime. This function very briefly blocks the Dart thread until the async runtime in Rust is completely dropped. It's recommended to call this before closing your Flutter app to prevent potential resource leaks from Rust. On the web, this function has no effect as tasks are managed by the JavaScript runtime rather than the Rust async runtime.
-
initializeRust(
AssignRustSignal assignRustSignal, {String? compiledLibPath}) → Future< void> -
Starts the
mainfunction in Rust. -
sendDartSignal(
String endpointSymbol, Uint8List messageBytes, Uint8List binary) → void - Sends a signal to Rust by using a symbol that exists inside local space of the loaded dynamic library.