frontend_server_client
4.2.0, released 4 weeks ago by tools.dart.dev
Client to interact with Dart SDK's frontend_server compiler.
What it does
Provides a programmatic interface to start and communicate with the frontend_server compiler bundled with the Dart SDK. It supports compiling Dart code, hot reload, hot restart, and expression compilation for DDC apps.
AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Building tools that need to compile Dart code via the SDK
- Implementing custom development servers or IDE integrations
- Enabling hot reload or restart in DDC-based workflows
Skip it when
- Developing general Flutter or Dart applications that don't require compiler interaction
- Using it outside the Dart SDK environment
Strengths
- Supports DDC library bundle format and hot reload
- Provides helpers for app bootstrapping
- Handles SDK version constraints automatically
- Offers native asset and source inclusion
Weaknesses
- Highly dependent on the Dart SDK version
- Not suitable for general app development
- Requires same SDK build for all artifacts
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
```dart
import 'package:frontend_server_client/frontend_server_client.dart';
final client = await FrontendServerClient.start();
final result = await client.compile('main.dart');
print(result.dillOutput);
```Alternatives
Packages that do the same job and could replace frontend_server_client.
- apollovm
Portable multi-language VM to parse, run, translate, and compile Dart, Java, Kotlin, Go, C#, JS, and Python.
76Compare - dart_eval
A flexible Dart bytecode compiler and interpreter for dynamic execution and code push.
72Compare - flutter_patcher
Self-hosted OTA hotfix tool for Flutter with signed code and asset patches.
65Compare - buffer
Utilities and classes for reading and writing byte buffers and binary data streams.
50Compare
Works with
Packages commonly used together with frontend_server_client: ones it builds on, ones built on it, and its own family.
- package_configfrontend_server_client depends on itRead and write Dart package configuration files.
- asyncfrontend_server_client depends on itUtility classes and helpers that extend Dart's async library.
- analyzerSame familyPerforms static analysis of Dart code for tool integration and embedding.
- dart_styleSame familyProvides an API and CLI to format Dart source code automatically.
- coverageSame familyCollects, manipulates, and formats code coverage data in Dart
- dwdsSame familyProxies between the Chrome debug protocol and the Dart VM service protocol.
- build_runnerSame familyA build system for Dart code generation and modular compilation.
- build_daemonSame familyDaemon for running Dart builds in the background