Dart Kernel #
Dart Kernel is a small high-level language derived from Dart. It is designed for use as an intermediate format for whole-program analysis and transformations, and to be consumed by codegen and execution backends.
The kernel language has an in-memory representation in Dart and can be serialized as binary or text.
Both the kernel language and its implementations are unstable and are under development.
This package contains the Dart part of the implementation and contains:
- A transformable IR for the kernel language
- Serialization of kernel code
Note: The APIs in this package are in an early state; developers should be careful about depending on this package. In particular, there is no semver contract for release versions of this package. Please depend directly on individual versions.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: kernel: ^0.3.29
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.5
Health issues and suggestions
bin/transform.dart. (-26.86 points)
bin/transform.dart failed with 1 error, 5 hints, including:
line 9 col 8: Target of URI doesn't exist: 'package:front_end/src/api_prototype/constant_evaluator.dart'.
line 25 col 20: Unnecessary new keyword.
line 88 col 21: Unnecessary new keyword.
line 89 col 21: Unnecessary new keyword.
line 98 col 11: Unnecessary new keyword.
lib/ast.dart. (-25 points)
lib/ast.dart reported 202 hints, including:
line 138 col 23: Unnecessary new keyword.
line 187 col 39: Unnecessary new keyword.
line 239 col 3: Avoid return types on setters.
line 331 col 13: Unnecessary new keyword.
line 353 col 3: Avoid return types on setters.
lib/binary/ast_from_binary.dart. (-25 points)
lib/binary/ast_from_binary.dart reported 189 hints, including:
line 151 col 37: Unnecessary new keyword.
line 168 col 23: Unnecessary new keyword.
line 214 col 28: Unnecessary new keyword.
line 239 col 16: Unnecessary new keyword.
line 241 col 16: Unnecessary new keyword.
Fix additional 37 files with analysis or formatting issues. (-363 points)
Additional issues in the following files:
Maintenance issues and suggestions
Provide a file named
CHANGELOG.md. (-20 points)
Changelog entries help developers follow the progress of your package. See the example generated by
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
kernel.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.