dart-native / Dart_native
Licence: bsd-3-clause
Write iOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.
Stars: ✭ 564
Programming Languages
Projects that are alternatives of or similar to Dart native
Android Luajit Launcher
Android NativeActivity based launcher for LuaJIT, implementing the main loop within Lua land via FFI
Stars: ✭ 87 (-84.57%)
Mutual labels: jni, ffi, native
Inline Java
Haskell/Java interop via inline Java code in Haskell modules.
Stars: ✭ 197 (-65.07%)
Mutual labels: jni, ffi
Xcrash
🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
Stars: ✭ 2,689 (+376.77%)
Mutual labels: jni, native
UnityNativeTool
Allows to unload native plugins in Unity3d editor
Stars: ✭ 147 (-73.94%)
Mutual labels: native, runtime
Xcrash
🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
Stars: ✭ 148 (-73.76%)
Mutual labels: jni, native
Arcgis Appstudio Samples
Collection of samples available in AppStudio for ArcGIS desktop to learn and help build your next app.
Stars: ✭ 78 (-86.17%)
Mutual labels: runtime, native
Easyincrementalupdate
Android差分补丁库,通过native层合并APK,实现增量更新升级,让你更新的APK更小。
Stars: ✭ 233 (-58.69%)
Mutual labels: jni, native
rust-flutter-reactive
This is a sample app to improve consistency over Mobile App Development.
Stars: ✭ 25 (-95.57%)
Mutual labels: native, ffi
Jpegkit Android
Efficient JPEG operations for Android without the risk of an OutOfMemoryException.
Stars: ✭ 154 (-72.7%)
Mutual labels: jni, native
Fake Jni
An implementation of the JNI and JVMTI with support for direct interaction between natively registered classes and JVM objects.
Stars: ✭ 20 (-96.45%)
Mutual labels: jni, native
sqlite3
The fastest and correct module for SQLite3 in Deno.
Stars: ✭ 143 (-74.65%)
Mutual labels: native, ffi
PointerScript
Scripting language with pointers and native library access.
Stars: ✭ 26 (-95.39%)
Mutual labels: native, ffi
Corium
Corium is a modern scripting language which combines simple, safe and efficient programming.
Stars: ✭ 18 (-96.81%)
Mutual labels: native, runtime
Lilith
Lilith, The Open Source C++ Remote Administration Tool (RAT)
Stars: ✭ 493 (-12.59%)
Mutual labels: native
Azteceditor Android
A reusable native Android rich text editor component.
Stars: ✭ 518 (-8.16%)
Mutual labels: native
dart_native
Write native code using Dart. This package liberates you from native code and low performance channel.
Still under development!!!
This is the blue part(DartNative Bridge) in the picture below:
📲 Requirement
DartNative Version | Requirements |
---|---|
0.3.0 | Flutter 1.20.0 (Dart 2.9.1) |
0.2.0 | Flutter 1.12.13 (Dart 2.7) |
🌟 Feature
- [x] Support iOS & Android platform.
- [x] Sync/Async channel with high performance.
- [x] Generate Dart bridging code from native code.
- [x] Automatic object marshalling between Dart and native.
🔮 Getting Started
Dart code:
// new Objective-C object.
RuntimeStub stub = RuntimeStub();
// Dart function will be converted to Objective-C block.
stub.fooBlock((NSObject a) {
print('hello block! ${a.toString()}');
return 101;
});
// support built-in structs.
CGRect rect = stub.fooCGRect(CGRect(4, 3, 2, 1));
print(rect);
Objective-C code:
typedef int(^BarBlock)(NSObject *a);
@interface RuntimeStub
- (CGRect)fooCGRect:(CGRect)rect;
- (void)fooBlock:(BarBlock)block;
@end
📚 Document
Readme
Blog
- 告别 Flutter Channel,调用 Native API 仅需一行代码!
- 如何实现一行命令自动生成 Flutter 插件
- 用 Dart 来写 Objective-C 代码
- 谈谈 dart_native 混合编程引擎的设计
- DartNative Memory Management: Object
- DartNative Memory Management: C++ Non-Object
- DartNative Struct
- 在 Flutter 中玩转 Objective-C Block
- Passing Out Parameter in DartNative
🐒 Q&A
Q: Failed to lookup symbol (dlsym(RTLD_DEFAULT, InitDartApiDL): symbol not found) on iOS archive.
There are two Workarounds:
- Use dynamic library: Add
use_frameworks!
in Podfile. - Select Target Runner -> Build Settings -> Strip Style -> change from "All Symbols" to "Non-Global Symbols"
❤️ Contributed
- If you need help or you'd like to ask a general question, open an issue.
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
👮🏻 License
DartNative is available under the BSD 3-Clause License. See the LICENSE file for more info.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].