Skip to main content

kiln 1.0.0 copy "kiln: ^1.0.0" to clipboard
kiln: ^1.0.0 copied to clipboard

Prebuilt native libraries and web runtime files for Dart build hooks, built by the same hook code that builds from source.

example/example.md

kiln example #

The build hook #

hook/build.dart of a package with native code. Kiln.run downloads the prebuilt library that matches the package sources, or builds it from source:

import 'package:hooks/hooks.dart';
import 'package:kiln/kiln.dart';

void main(List<String> args) async {
  await build(args, (input, output) async {
    final kiln = Kiln(input: input, output: output);
    if (!input.config.buildCodeAssets) return kiln.installWeb();
    await kiln.run((source) => buildFromSource(input, output, source));
  });
}

A release #

# The source key that the prebuilt files are for.
dart run kiln:key
# Build one target with the hook, then upload the files and write
# native_artifacts/prebuilt.json.
dart run kiln:build --target macos-arm64 --out build/macos-arm64
dart run kiln:release build/macos-arm64
# Check the source key and every URL of the manifest.
dart run kiln:check
0
likes
160
points
9.16k
downloads

Documentation

API reference

Publisher

verified publishertelosnex.com

Weekly Downloads

Prebuilt native libraries and web runtime files for Dart build hooks, built by the same hook code that builds from source.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

archive, args, code_assets, crypto, hooks, logging, path, yaml

More

Packages that depend on kiln