hook library
Build-hook support for dart_cpp_bridge Native Assets.
Provides a platform-configuration sealed hierarchy (DcbPlatformConfig) and
a reusable CMake-driven builder (DcbCMakeBuilder) that downstream packages
use from their hook/build.dart to compile a native library and emit it as
a bundled CodeAsset, consumable at runtime via
@Native(assetId: 'package:<package>/<assetName>').
Supported platforms: Windows, Linux, macOS, Android, iOS.
This library is intentionally separate from package:dart_cpp_bridge
(the runtime FFI front-end): it depends on package:hooks /
package:code_assets, which are only needed inside a build hook.
Classes
- AndroidConfig
- Android configuration for DcbCMakeBuilder.
- DcbBuildOptions
- Top-level build options that apply across all platforms.
- DcbCMakeBuilder
-
A reusable build-hook builder that drives CMake to compile a native library
and emits it as a bundled
CodeAsset. - DcbPlatformConfig
- Platform-specific configuration for DcbCMakeBuilder.
- IosConfig
- iOS configuration for DcbCMakeBuilder.
- LinuxConfig
- Linux configuration for DcbCMakeBuilder.
- MacosConfig
- macOS configuration for DcbCMakeBuilder.
- WindowsConfig
- Windows configuration for DcbCMakeBuilder.
Enums
- CmakeGenerator
- CMake build-system generator selection.
- WindowsCompiler
- Windows C++ compiler selection.
Exceptions / Errors
- DcbCMakeException
- Thrown when a CMake invocation or artifact lookup fails in DcbCMakeBuilder.