native_toolchain_cmake
0.3.2, released 3 months ago by rainyl.dev
A library to invoke and build CMake projects for Dart Native Assets.
What it does
Provides utilities to invoke and build CMake projects specifically for Dart Native Assets. Allows configuring CMake and Ninja versions, as well as Android NDK discovery through pubspec.yaml hooks.
AI-written summary of version 0.3.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building Dart Native Assets that require compiling a CMake project.
- You need to configure custom CMake, Ninja, or Android NDK versions for your native builds via pubspec.yaml.
Skip it when
- Your project does not use Dart Native Assets or CMake.
- You want an established, stable toolchain library and wish to avoid experimental features.
Strengths
- Simplifies integrating CMake projects into Dart Native Assets workflows.
- Supports fine-grained configuration for Android, iOS, Windows, Linux, and macOS in pubspec.yaml.
Weaknesses
- Explicitly marked as experimental and may change without warning.
- Relies on external tools like CMake and Ninja being properly configured or discoverable.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 8
Requires configuring hooks and user defines in pubspec.yaml, along with having CMake and Ninja or appropriate NDK paths set up for target platforms.
hooks:
user_defines:
YOUR_PACKAGE_NAME:
cmake_version: "3.22.1"
ninja_version: "1.10.2"Alternatives
Packages that do the same job and could replace native_toolchain_cmake.
- flutter_olm
Builds the native Olm library for Android and iOS to be used via dart:ffi.
40Compare
Works with
Packages commonly used together with native_toolchain_cmake: ones it builds on, ones built on it, and its own family.
- pub_semvernative_toolchain_cmake depends on itVersions and version constraints implementing pub's versioning policy.
- globnative_toolchain_cmake depends on itA file and directory globbing library that supports Bash-style path matching and listing.
- hooksnative_toolchain_cmake depends on itDart API for the JSON-based protocol for package build and link hooks.
- code_assetsnative_toolchain_cmake depends on itProvides the hook protocol specification for bundling native code with Dart packages.
- loggingnative_toolchain_cmake depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- change_casenative_toolchain_cmake depends on itExtension on String to convert between many common case styles
- webcryptoBuilt on native_toolchain_cmakeCross-platform implementation of Web Cryptography APIs for Dart.
- dartcv4Built on native_toolchain_cmakeOpenCV4 bindings for Dart/Flutter using ffi for native computer‑vision functions.