build_daemon
4.1.7, released 5 weeks ago by tools.dart.dev
Daemon for running Dart builds in the background
What it does
Provides a background process that accepts build requests over WebSocket, manages workspace state, and returns build results. It handles version checks, authentication tokens, and workspace isolation.
AI-written summary of version 4.1.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to run multiple Dart builds concurrently or offload build work to a background process
- You want to integrate build execution into a CI or IDE workflow
- You need to avoid blocking the main thread while building
Skip it when
- You only need a single, quick build and don't want the overhead of a daemon
- You are building a small script that runs a single build
Strengths
- Handles workspace isolation and version skew detection
- Supports WebSocket authentication and secure communication
- Built on stable Dart packages and requires only Dart SDK
Weaknesses
- Requires Dart 3.7.0+
- No built-in UI, only command-line/WebSocket interface
- Limited to Dart builds, not other languages
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 15
Run `dart pub global activate build_daemon` and start the daemon with `build_daemon start`. Clients connect via WebSocket using the provided token. No special permissions needed.
```dart
import 'package:build_daemon/build_daemon.dart';
final daemon = DaemonBuilder();
await daemon.start();
// Build requests can now be sent over WebSocket
```Works with
Packages commonly used together with build_daemon: ones it builds on, ones built on it, and its own family.
- yamlbuild_daemon depends on itA Dart library for parsing YAML documents into Dart data structures.
- cryptobuild_daemon depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- pub_semverbuild_daemon depends on itVersions and version constraints implementing pub's versioning policy.
- package_configbuild_daemon depends on itRead and write Dart package configuration files.
- poolbuild_daemon depends on itManage a finite pool of resources to control concurrent operations.
- built_valuebuild_daemon depends on itImmutable value types with builders, enum classes and JSON serialization for Dart.
- shelfbuild_daemon depends on itComposable web server middleware for Dart
- http_multi_serverbuild_daemon depends on itA dart:io HttpServer wrapper that handles requests from multiple servers.