搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.1

jnigen

一個用於 Java 和 Kotlin 的 Dart 綁定產生器,使用 JNI 在底層實現與 Java 虛擬機的互操作。

AndroidiOSmacOSWindowsLinux
近 30 天下載
5.6萬
喜歡數
135
Pub 分數
160

安裝套件

flutter pub add jnigen

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Jnigen 是一個 Dart 套件,可產生 Java 與 Kotlin 程式碼的綁定,透過 JNI 來實現與 Java 虛擬機的無縫互操作。它簡化了在跨平台應用中從 Dart 呼叫 Java/Kotlin 函數的過程,特別適用於 Android 及其他基於 JVM 的環境。該工具自動化建立原生介面,減少冗餘程式碼並提升整合的可靠性。它是 Dart Native 生態系統的一部分,支援包括 Android、iOS、macOS、Windows 和 Linux 在內的多個平台。

適用情境

  • 從 Dart 呼叫 Java/Kotlin 庫
  • 整合原生 Android SDK
  • 使用JVM程式碼擴展Dart應用
  • 跨平台移動開發
  • 使用原生效能建構混合應用

主要特色

  • 自動產生 JNI 繫結
  • 支援 Java 與 Kotlin
  • 多平台相容性
  • 與 Dart 原生生態系統的整合
  • 減少手動 JNI 編碼

適合對象

  • 針對 Android 的 Dart 開發人員
  • 使用 Java/Kotlin 庫的團隊
  • 需要高效率原生互操作的專案
  • 混合應用開發者
  • 跨平台移動開發團隊

使用建議

  • 需要了解 JNI 概念
  • 僅限 JVM 相容平台
  • 可能增加建構複雜性
  • 不適用於純Flutter應用
  • 由於原生依賴項,應用程式大小可能更大

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Coverage Status

Overview

This repository is home to Dart packages related to FFI and native assets building and bundling.

Documentation

See the doc directory for more documentation.

Packages

Package Description Issues Version
code_assets This package contains the Dart API for code assets in hook/build.dart and hook/link.dart. issues pub package
data_assets This package contains the Dart API for data assets in hook/build.dart and hook/link.dart. issues pub package
ffi Utilities for working with Foreign Function Interface (FFI) code. issues pub package
ffigen Generator for FFI bindings, using LibClang to parse C, Objective-C, and Swift files. issues pub package
hooks This package contains the API for hook/build.dart and hook/link.dart. issues pub package
hooks_runner This package is the backend that invokes hook/build.dart and hook/link.dart from Dart and Flutter. issues pub package
jni A library to access JNI from Dart and Flutter that acts as a support library for package:jnigen. issues pub package
jni_flutter A library to access Flutter Android specific APIs from Dart. issues pub package
jni_util A library to access Flutter Android specific APIs from Dart. issues pub package
jnigen A Dart bindings generator for Java and Kotlin that uses JNI under the hood to interop with Java virtual machine. issues pub package
native_toolchain_c A library to invoke the native C compiler installed on the host machine. issues pub package
objective_c A library to access Objective C from Flutter that acts as a support library for package:ffigen. issues pub package
record_use Dart API to access @RecordUse() recorded usages in link hooks. issues pub package
swift2objc A tool for generating bindings that allow interop between Dart and Swift code. issues pub package
swiftgen A tool for generating bindings that allow interop between Dart and Swift code. issues pub package

External packages

Packages not on this repo but also related to FFI and native assets. ❤️

Package Description Version
native_toolchain_cmake A library to invoke CMake for Dart Native Assets. pub package
native_toolchain_go A library to invoke the native Go compiler installed on the host machine. pub package
native_toolchain_ninja A library to invoke Ninja for Dart Native Assets. pub package
native_toolchain_rust A library to build and bundle Rust code for Dart Native Assets. pub package
native_toolchain_zig A library to build and bundle Zig code for Dart Native Assets. pub package

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

For additional information about contributing, see our contributing page.

所屬分類

依賴

依賴清單 11 項

原始碼儲存庫

使用此套件的專案

所在榜單