Skip to content

Commit

Permalink
Clarify comments
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Sep 12, 2024
1 parent 3a6b567 commit 8fb6697
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flutter_package/lib/src/load_os.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ abstract class RustLibrary {

/// Class for global native library symbols loaded with `RTLD_GLOBAL`.
/// This is the efficient and ideal way to call native code.
/// `@Native` decorator with `isLeaf` parameter
/// that enables the `Uint8List.address` syntax
/// can only used on global native symbols.
/// - https://github.com/dart-lang/sdk/issues/44589
class RustLibraryNew extends RustLibrary {
void startRustLogic() {
startRustLogicExtern();
Expand Down Expand Up @@ -154,7 +158,6 @@ class RustLibraryNew extends RustLibrary {

/// Class for local native library symbols loaded with `RTLD_LOCAL`.
/// This is relatively inefficient because `malloc.allocate` is required.
/// `@Native` attributes can only used on global native symbols.
class RustLibraryOld extends RustLibrary {
final DynamicLibrary lib;
RustLibraryOld(this.lib);
Expand Down

0 comments on commit 8fb6697

Please sign in to comment.