zerocopy 0.1.0
zerocopy: ^0.1.0 copied to clipboard
Eliminates the Dart↔Native "Copy Tax" using SIMD-aligned C++ shared memory, Pointer.asTypedList() bridging, and an atomic spinlock. Zero serialization. Zero GC impact.
0.1.0 #
- Initial release.
- Allocates 64-byte SIMD-aligned native memory buffers from C++ via
aligned_alloc/posix_memalign/_aligned_malloc. - Bridges native memory directly to Dart
Uint8ListviaPointer.asTypedList()— zero data copying. - Provides an atomic spinlock (
std::atomic_flag) for non-blocking thread safety between Dart and native threads. - Automatic memory management via
NativeFinalizer— no leaks even ifdispose()is not called. - Cross-platform native compilation via Dart 3 Native Assets (
hook/build.dart) withnative_toolchain_c. - Supports Android, iOS, macOS, Windows, and Linux with no manual build configuration.
- Compiler flags:
-O3 -ffast-math -fPICfor maximum native performance.