パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v23.0.0

ffigen

C、Objective-C、Swift ファイルを解析するために LibClang を使用する FFI バインディングのジェネレーター。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
109万
いいね数
338
Pub ポイント
160

パッケージをインストール

flutter pub add ffigen

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

ffigen は、C、Objective-C、Swift ライブラリ用の Dart FFI(外部関数インターフェース)バインディングを生成するコードジェネレータです。LibClang を使ってネイティブヘッダーを解析し、対応する Dart コードを自動的に生成することで、Dart とネイティブコードとのシームレスな相互運用性を実現します。これにより、手動でバインディングを作成せずに Dart からネイティブ関数を呼び出すことが簡単になります。パフォーマンスが重要なアプリケーションや、既存のネイティブライブラリを Flutter アプリに統合する場合に最適です。

用途

  • FlutterアプリにCライブラリを統合する
  • Dartからネイティブ関数を呼び出す
  • iOS および Android 用の FFI バインディングを生成する
  • FlutterでSwiftライブラリを使用する
  • 高性能なネイティブ拡張機能の構築

主な機能

  • 自動的に FFI バインディングを生成します
  • C、Objective-C、Swift をサポートしています
  • 正確な解析のために LibClang を使用します
  • きれいで読みやすいDartコードを生成します
  • カスタマイズ可能な出力と名前付け

適している対象

  • ネイティブC/C++ライブラリを使用する開発者
  • 高性能なネイティブ呼び出しを必要とするFlutterアプリ
  • クロスプラットフォームネイティブ統合を維持するチーム
  • 最小限の FFI ボイラープレートを必要とするプロジェクト

注意事項

  • LibClang のインストールが必要です
  • プラットフォーム固有の設定が必要になる場合があります
  • 生成されたコードは手動での調整を必要とする場合があります
  • 動的または実行時ロードされたライブラリには適していません
  • 一部のプラットフォームにおけるビルド設定の複雑さ

元の 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.

カテゴリー

依存関係

依存関係一覧 18 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

ランキング