Skip to content
flutter avatar

Dart Setup Ffi Assets

Guide to compiling C/C++ into Dart Code Assets with build and link hooks, including tree-shaking and verified binary downloads.

CCM score
64 of 100
skills.sh installs
17.5K
GitHub stars
3.2K
last updated
Nov 28, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers two integration methods: local C/C++ compilation with linker tree-shaking, and precompiled dynamic library downloads
  • Includes hook/build.dart and hook/link.dart setup, a shared lib/src/c_library.dart spec, and FFIgen record-use mapping files
  • Requires package:native_toolchain_c for compilation and enforces hash-checked MD5 or SHA-256 verification for downloaded binaries
  • Designed for Dart and Flutter packages that bundle C or C++ interop through dart run, dart test, or dart build

Install

$ npx -y skills add flutter/agent-plugins --skill dart-setup-ffi-assets -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Compiling C Code into Code Assets with Native Assets Hooks

Integrate and automate the compilation and packaging of native C/C++ source code into Code Assets under Dart's overarching Native Assets feature using build and link hooks.

Details

Repository
github.com/flutter/agent-plugins
Category
Game Development
First seen
Nov 28, 2026

Questions

What does the dart-setup-ffi-assets skill do?

It guides agents in compiling C or C++ source code into dynamic or static libraries using Dart's Native Assets hooks, through hook/build.dart and hook/link.dart. It can also set up hash-validated downloads of precompiled binaries.

How do I install the dart-setup-ffi-assets skill?

Run npx -y skills add flutter/agent-plugins --skill dart-setup-ffi-assets -y in your project. Once installed, the agent can set up native assets for C/C++ interop in Dart and Flutter projects.

Which category is dart-setup-ffi-assets in, and what sets it apart?

It is in the Game Development category, where it ranks in the top 25 on the category page. Its focus is on C/C++ interop through Dart's Native Assets system, with optional linker tree-shaking to shrink the binary.

Who is dart-setup-ffi-assets for?

It is for developers who want to integrate C or C++ code into a Dart or Flutter package without manual toolchain orchestration. The skill covers when to compile locally and when to download precompiled libraries.

More from flutter/agent-plugins

All 13

Similar to Dart Setup Ffi Assets

More Game Development