Vm compilers for users of
This package is intended to be used as a development dependency for users
package:build who want to run code in the Dart vm with precompiled
kernel files. This allows you to share compilation of dependencies between
multiple entrypoints, instead of doing a monolithic compile of each entrypoint
like the Dart VM would normally do on each run.
Note: If you want to use this package for running tests with
pub run build_runner test you will also need a
build_test dev dependency.
This package creates a
.vm.app.dill file corresponding to each
that contains a
These files can be passed directly to the vm, instead of the dart script, and the vm will skip its initial parse and compile step.
You can find the output either by using the
-o <dir> option for build_runner,
or by finding it in the generated cache directory, which is located at
There are no configuration options available at this time.
If you are using a custom build script, you will need to add the following
builder applications to what you already have, sometime after the
build_modules builder applications:
apply('build_vm_compilers|entrypoint', [vmKernelEntrypointBuilder], toRoot(), hideOutput: true, // These globs should match your entrypoints only. defaultGenerateFor: const InputSet( include: const ['bin/**', 'tool/**', 'test/**.vm_test.dart'])), ]
vmplatform and builders explicitly.
Support the latest build_modules.
Initial release, adds the modular kernel compiler for the vm platform, and the entrypoint builder which concatenates all the modules into a single kernel file.
Add this to your package's pubspec.yaml file:
dependencies: build_vm_compilers: ^1.0.3
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.
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 Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, other
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
build_vm_compilers.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
The package description is too short. (-9 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.
|Dart SDK||>=2.3.0-dev.0.1 <3.0.0|