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

插件详情v0.19.6

native_toolchain_c

一个库,用于调用主机上安装的原生 C 编译器。

AndroidiOSmacOSWindowsLinux
近 30 天下载
447万
喜欢数
27
Pub 分数
150

安装插件

flutter pub add native_toolchain_c

插件介绍

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

一个 Flutter/Dart 包,可调用主机上安装的原生 C 编译器。它在 Dart 和系统级 C 工具链之间提供桥梁,使开发者能够直接从 Dart 应用程序编译 C 代码。这对于性能关键任务或将现有 C 库集成到 Flutter 项目中特别有用。该包支持 Android、iOS、macOS、Windows 和 Linux 等多个平台,确保跨平台兼容性。它是 Dart Native 生态系统的一部分,专为低级别系统集成而设计。

适合场景

  • 在运行时编译C代码
  • 集成遗留的 C 库
  • 性能关键的计算
  • 跨平台原生构建
  • 系统级开发

主要特点

  • 对原生 C 编译器的直接访问
  • 跨平台支持
  • 与 Dart 的无缝集成
  • 支持 Android、iOS、macOS、Windows、Linux
  • Dart Native 生态系统的一部分

适合对象

  • 使用C库的开发人员
  • 需要高性能原生代码的项目
  • 跨平台原生工具
  • 高级 Flutter 集成
  • 系统级应用开发

使用建议

  • 需要在主机上安装C编译器
  • 平台特定的编译行为
  • 仅限具有原生工具链的系统
  • 可能需要为 CI/CD 进行额外设置
  • 不适合简单的应用逻辑

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

所属分类

依赖

依赖清单 8 项

源码仓库

使用此插件的项目