nitro 0.2.2
nitro: ^0.2.2 copied to clipboard
High-performance Native Modules for Flutter (Nitro Modules equivalent). Runtime support for .native.dart spec generated bridges.
0.2.2 #
- Improved: annotation compatibility — verified full compatibility with Nitrogen 0.2.2's stable annotation resolution system, ensuring re-exported
@NitroModule,@HybridStruct, and@HybridEnumannotations are correctly identified by the code generator. - Added explicit
voidsupport in return types for allHybridObjectmethods.
0.2.1 #
- Moved all annotations to the separate
nitro_annotationspackage to improve generator platform compatibility. - Re-exported
nitro_annotationsfor backward compatibility. - Added explicit support for
macos,windows, andlinuxto the plugin configuration to resolvepub.devplatform detection warnings.
0.2.0 #
- New: Binary
RecordWriterandRecordReaderCodec — Compact little-endian protocol for@HybridRecordtypes, replacing JSON text serialization with direct binary field access over rawuint8_t*buffers.- Wire format:
int64(8B),float64(8B),bool(1B),String(4-byte length + UTF-8), nullable (1-byte tag), andlist(4-byte count). - High-performance
encodeList/decodeListfor collections of records or primitives. - Retains
dart:convertre-exports forMap<String, T>which still uses the JSON path.
- Wire format:
- New:
IsolatePool&NitroRuntime.init()— Fixed-size pool of persistent worker isolates with round-robin dispatch. Pre-warmed byinit()to eliminate the ~1–5 msIsolate.spawnoverhead on everycallAsync. - New:
NitroConfigRuntime Singleton — Configurable runtime behavior:debugMode: Enables verbose logging of bridge calls, streams, isolates, and lifecycles.logLevel: Granular control (none,error,warning,verbose).logHandler: Custom sink for logs (e.g., Firebase, Sentry, Crashlytics).slowCallThresholdUs: Configurable warning threshold for long-running async calls (default 16ms).
- Improved:
NitroRuntimeRobustness — Stream unpack errors are now always logged aterrorlevel with stack traces, ensuring they are never silently swallowed. AddeddebugLabelto streams for easier debugging. - Fix: Style & Linting — Renamed internal state variables (e.g.,
_released→released) to follow Dart conventions for local variables.
0.1.0 #
- Initial release of Nitro runtime.
- Support for
HybridObject,HybridStruct, andHybridEnum. - Support for synchronous and asynchronous bridge calls.
- Unified FFI bridge support for Android and iOS.