pub repository
mirror.p-hatan.irfrontend_server_client
4.2.0Client code to start and interact with the frontend_server compiler from the Dart SDK.
Readme
This package provides a client interface around the frontend_server compiler which ships with the Dart SDK. It is highly dependent on the SDK's version and thus should only be used within the SDK or for specific tools that need to interact with our compilers.
Version restrictions
Every SDK artifact discovered by or passed to package:frontend_server_client
needs to have come from the same build, and the version of
package:frontend_server_client being used must support that SDK version.
Serving DDC apps
To serve an app compiled by DDC in its library bundle format, use
DartDevcFrontendServerClient, DdcLibraryBundleSdkAssets, and
generateDdcLibraryBundle*:
- Start
DartDevcFrontendServerClientwithdartdevcModuleFormat: 'ddc'andcanaryFeatures: true. sdkRootin bothDartDevcFrontendServerClient.startandDdcLibraryBundleSdkAssets.loaddefault to the running SDK's directory but must be overridden for AoT-compiled apps.- Call
DdcLibraryBundleSdkAssets.loadfrom your package root.dart_sdk.jsis compiled on first use and cached in.dart_tool/frontend_server_client. - To use a prebuilt
dart_sdk.jsinstead, pass its path toDdcLibraryBundleSdkAssets.loadviasdkJsPath. Compile it withsdkRoot's DDC using--modules=ddc --canary, and place its source map at<sdkJsPath>.map.
Changelog
4.2.0
- Support the DDC library bundle format and allow Frontend Server-driven hot reload, hot restart, and expression compilation.
- Add helpers for app bootstrapping.
4.1.0
- Support running from standalone CLI executables and respect
sdkRootwhen locating SDK tools and snapshots. - Update Dart SDK constraint to
^3.10.0. - Allow package_config
3.x.x.
4.0.0
- Update Dart SDK constraint to
^3.0.0. - Support changes in the SDK layout for Dart 3.0.
- By default, start the frontend server from the AOT snapshot shipped in the Dart SDK.
- Throw an
ArgumentErrorwhenFrontendServerClient.startis called with thefrontendServerPathargument omitted and thedebugargument set to true. - Update
package:vm_serviceconstraint to^14.0.0.
3.2.0
- Add
nativeAssetsparameter toFrontendServerClient, for passing additional--native-assetsto the kernel compiler.
3.1.0
- Add
additionalSourcesparameter toFrontendServerClient, for passing additional--sources to the kernel compiler.
3.0.0
- Update the
compileapi to return a non-nullCompileResult, and instead make thedillOutputfield nullable. This allows you to still get compiler output if no dill file was produced.
2.1.3
- Update
package:vm_serviceto version^8.0.0
2.1.2
- Force kill the frontend server after one second when calling shutdown. It appears to hang on windows sometimes.
2.1.1
- Fix a bug where spaces in the output dill path would cause a parse error when reading the error count output.
2.1.0
- Support enabling experiments when starting the compiler.
2.0.1
- Widen the upper bound sdk constraint to
<3.0.0. The frontend server api is now considered quite stable and this package is now depended on by package:test, so a tight constraint would cause unnecessary headaches.
2.0.0
- Support null safety.
1.0.0
- Initial version
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add frontend_server_clientpubspec.yaml
name: frontend_server_client
version: 4.2.0
description: >-
Client code to start and interact with the frontend_server compiler from the
Dart SDK.
repository: https://github.com/dart-lang/sdk/tree/main/pkg/frontend_server_client
resolution: workspace
environment:
sdk: ^3.13.0-0.0.dev
dependencies:
async: ^2.5.0
package_config: '>=2.1.0 <4.0.0'
path: ^1.8.0
dev_dependencies:
dart_flutter_team_lints: any
shelf: any
shelf_packages_handler: any
shelf_static: any
test: any
test_descriptor: any
test_process: any
vm_service: any
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | 2020-11-30T21:56:55.265828Z | Download | 30e76bfa3a13629624320a6f134c1e720b2ddb5ae884d15780c446d42636c599 |
| 2.0.0 | 2021-03-10T17:48:05.042009Z | Download | d341751c4aefe55144d17bb150d261e8e085d6b1b7fe79b0956d3405bf61fe75 |
| 2.1.0 | 2021-04-29T16:22:36.176866Z | Download | 780784ec9e9362ed5278272d39b6590474dba495483ec97eba31df4d23622fa0 |
| 2.1.1 | 2021-08-16T18:26:18.252030Z | Download | 8cab40f1feaff5bc7b6a6aa71937f4829a36857b9d7752f563290cc563c1a84b |
| 2.1.2 | 2021-08-19T14:52:18.456651Z | Download | 6d2930621b9377f6a4b7d260fce525d48dd77a334f0d5d4177d07b0dcb76c032 |
| 2.1.3 | 2022-05-16T21:49:25.045426Z | Download | 4f4a162323c86ffc1245765cfe138872b8f069deb42f7dbb36115fa27f31469b |
| 3.0.0 | 2022-08-18T14:38:17.317637Z | Download | 01fb90a581ee2bbca0a1c72b04f73b5e9e89b89bf608c9dfa815ea9cec00f11c |
| 3.1.0 | 2022-10-20T17:54:51.708546Z | Download | 82715f8041a85a534a7bf64400b2ee0bb3d594ccf695d97c0bb017259657ff5d |
| 3.2.0 | 2022-11-24T14:52:35.844604Z | Download | 408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612 |
| 4.0.0 | 2024-03-26T17:36:08.504889Z | Download | f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 |
| 4.1.0 | 2026-10-02T13:20:20.211955Z | Download | 404dbf9bce29beafbe9dcb19219447b6f7d49900cd42b8d3b7af102b24508e25 |
| 4.2.0 | 2026-10-20T23:33:28.463507Z | Download | 2b56423afc7651a81da53ed3a4f9f51e92572293f54d0d54e19b759f13714849 |
Dependencies
async "^2.5.0"
package_config "\u003e=2.1.0 \u003c4.0.0"
path "^1.8.0"