Dart FFI 原生资产

原名:dart-setup-ffi-assets

通过 Native Assets hooks 编译和打包 C/C++ 库,建立可复现的 Dart FFI 构建流程。

中文 Skills 技能说明

适合 Dart 或 Flutter 项目集成本地原生库。开始前要确认目标平台、编译器、源码许可证和二进制来源;远程二进制必须固定版本并校验哈希,不接受不明下载地址,构建和链接修改应先在隔离环境验证。

上游能力依据

上游原始适用说明:Guides agents in compiling and packaging C/C++ source code into dynamic or static libraries (Code Assets) using Dart's Native Assets hook system (via hook/build.dart and hook/link.dart utilizing package:hooks and package:nativetoolchainc). Use when a user asks to: 'setup native assets', 'compile C/C++ source code', 'bundle dynamic libraries', 'build native C code', 'link native assets', 'implement build.dart or link.dart hooks', or 'integrate C/C++ interop in Dart/Flutter'. Helps agents avoid manual toolchain orchestration and configures secure hash-validated binary downloads or advanced linker tree-shaking with package:recorduse mapping.

上游 SKILL.md 主要章节(保留原文标题):

使用边界

先读取项目约定、依赖版本和现有测试,再提出最小改动。写文件、运行脚本、提交代码或发布前应检查差异并保留回退路径。

作者、翻译与许可证

原作者
The Flutter Authors 与 flutter/agent-plugins contributors
中文翻译
CEOFans翻译
许可证
BSD-3-Clause
上游来源
https://github.com/flutter/agent-plugins/tree/864cf8797b190ddb81e4875db6dd6bab89641f62/skills/dart-setup-ffi-assets

适用范围

平台:linux、macos、windows;标签:软件开发、Dart FFI 原生资产

安全提示

基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。

如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。