Unlocking Native Power: Deep Dive into Dart Build Hooks
summary
Dart Build Hooks (preview now, planned stable in the next release 3.10) provide a JSON protocol to inject build logic via a package-local hook/build.dart that compiles native code, produces code assets (dynamic libraries) and writes an output JSON consumed by Dart/Flutter. Demo builds SQLite from a single C source using package native_toolchain_c’s C builder which invokes clang, produces a namespaced asset used by FFI-generated bindings, passes dart test, supports multi-arch caching in a shared output dir and is asset-type agnostic with extension APIs for custom asset types.
AI-written summary · about
chapters (6)
- 0:00Introduction to build hooks
- 2:12How build hooks function
- 4:33Live demo: building SQLite
- 13:16Under the hood of build hooks
- 22:24Design philosophy and evolution
- 34:06Roadmap and community engagement
related talks
01h 25mBuilding Modern Native Applications with Gradle
34mShorebird CodePush: Revolutionising Flutter App Updates
29mIntroducing Dagger Modules: Open Source CI/CD Building Blocks You Already Know How to Write
41mBuild A Binary
25mKeynote: Evolution inside the build system (en)
41mBuild a Binary
07mBest Practices and Key Takeaways
34mDeep Dive: Cloud Native Buildpacks
