Support for external Strings.
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
I was delighted to find `Dart_NewExternalXString` in `dart_api.h`. My understanding is that these APIs allow Strings to be backed by native memory.
I've tried using them from within Dart, but I can't manage to get the finalizer machinery to work. My attempt can be found here: https://github.com/dart-lang/sdk/issues/50452.
I was wondering, have the maintainers of package:ffi considered to support e.g. `Dart_NewExternalUTF16String` for providing a view over native memory as a String?
For my use cases I'd like to share native memory across isolates, and the ability to create Strings from native memory in some zero-cost way would make that much more practical by making it significantly more efficient.
Contributor guide
Assessment
This issue has not been assessed yet.