nitro_generator 0.1.2
nitro_generator: ^0.1.2 copied to clipboard
Code generator for Nitro Modules (Nitrogen). Converts *.native.dart specs to Dart FFI, Kotlin, Swift, and C++ bindings.
0.1.2 #
- Swift generator: replaced
@objc public static func _call_*pattern with top-level@_cdecl("_call_*") public funcstubs. Swift structs and Swift-only protocols cannot cross the Objective-C boundary;@_cdeclexports plain C symbols that the generated C++ shim can call withextern "C". - Swift generator:
boolreturn type now maps toInt8(matching C'sint8_t) instead ofBool. - Swift generator: struct-returning functions now return
UnsafeMutableRawPointer?(heap-allocated, caller frees) instead ofAny?. - Swift generator: async struct functions use
DispatchSemaphore+Task.detachedto bridge async Swift to the synchronous C ABI required by@_cdecl. - Swift generator:
NitroBatteryRegistry(and all registries) no longer inheritNSObjector use@objc— pure Swift classes. - Added 10 new
SwiftGeneratortests covering the above patterns. - Fixed failing test that expected the old
@objc public static func _call_add(pattern.
0.1.1 #
- Renamed package from
nitrogentonitro_generatorto avoid a naming conflict onpub.dev.
0.1.0 #
- Initial release of Nitro code generator.
- Generates Dart FFI, Kotlin, Swift, and C++ bindings.
- Support for
HybridObject,HybridStruct, andHybridEnum. - Support for
@nitroAsyncmethods. - Support for
@NitroStreamwith Backpressure strategies.