@@ -6,6 +6,16 @@ import 'src/exports.dart';
66
77export 'src/interface.dart' show RustSignal;
88
9+ /// Sets the exact file path of the dynamic library
10+ /// compiled from the `hub` crate.
11+ /// On the web, this function sets the path to the JavaScript module
12+ /// that needs to be loaded.
13+ /// This function might not be necessary for major platforms
14+ /// but can be useful when the app runs on embedded devices.
15+ void setCompiledLibPath (String ? path) {
16+ setCompiledLibPathExtern (path);
17+ }
18+
919/// Prepares the native interface
1020/// needed to communicate with Rust.
1121Future <void > prepareInterface (HandleRustSignal handleRustSignal) async {
@@ -18,9 +28,9 @@ void startRustLogic() async {
1828}
1929
2030/// Terminates all Rust tasks.
21- /// Doing so before closing the Flutter app
22- /// can prevent potential memory errors that may occur
23- /// when Rust attempts to send data after the Dart VM has been turned off .
31+ /// Calling this function before closing the Flutter app
32+ /// can prevent potential resource leaks that may occur
33+ /// if the Rust side is abruptly terminated .
2434/// Please note that on the web, this function does not have any effect,
2535/// as tasks are managed by the JavaScript runtime, not Rust.
2636void stopRustLogic () async {
0 commit comments