zerocopy 0.1.0 copy "zerocopy: ^0.1.0" to clipboard
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 Uint8List via Pointer.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 if dispose() is not called.
  • Cross-platform native compilation via Dart 3 Native Assets (hook/build.dart) with native_toolchain_c.
  • Supports Android, iOS, macOS, Windows, and Linux with no manual build configuration.
  • Compiler flags: -O3 -ffast-math -fPIC for maximum native performance.
3
likes
150
points
91
downloads

Documentation

API reference

Publisher

verified publishermomarkhan.com

Weekly Downloads

Eliminates the Dart↔Native "Copy Tax" using SIMD-aligned C++ shared memory, Pointer.asTypedList() bridging, and an atomic spinlock. Zero serialization. Zero GC impact.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#ffi #performance #memory #native #dart-ffi

License

MIT (license)

Dependencies

code_assets, ffi, hooks, native_toolchain_c

More

Packages that depend on zerocopy