搜索插件、代码仓与 APP 分类

插件详情v2.2.0

hooks

一个包含用于基于 JSON 的协议的 Dart API 的库,该协议用于 `hook/build.dart` 和 `hook/link.dart`。

AndroidiOSmacOSWindowsLinux
近 30 天下载
1520万
喜欢数
42
Pub 分数
160

安装插件

flutter pub add hooks

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

hooks 包提供了一个 Dart API,用于与 `hook/build.dart` 和 `hook/link.dart` 使用的基于 JSON 的协议进行交互,从而实现 Dart 与其他语言(如 Python 和 Rust)之间的无缝集成。它促进了命令行工具和原生代码互操作性,特别是在需要跨语言构建和链接流程的环境中。该包是 Dart Native 生态系统的一部分,支持在 Android、iOS、macOS、Windows 和 Linux 上进行多平台开发。

适合场景

  • 跨语言构建集成
  • 原生代码链接
  • 用于语言互操作性的 CLI 工具
  • 多平台原生扩展
  • 使用外部工具进行构建自动化

主要特点

  • 基于 JSON 的协议支持
  • Dart API 用于构建/链接过程
  • 支持 Python 和 Rust 集成
  • 多平台兼容性
  • Dart Native 生态系统的一部分

适合对象

  • 开发原生扩展的开发者
  • 工具链集成商
  • 跨语言项目维护者
  • CLI 工具开发者
  • 多平台构建系统

使用建议

  • 需要理解 Dart 原生协议
  • 主要用于高级用例
  • 仅限构建时操作
  • 不适用于运行时应用程序逻辑
  • 依赖于 Dart 原生基础设施

原始 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.

所属分类

依赖

依赖清单 6 项

源码仓库

使用此插件的项目