build_vm_compilers 1.0.4

  • Readme
  • Changelog
  • Installing
  • 91

Vm compilers for users of package:build.
Build Status Issues related to build_vm_compilers Pub Package Version Latest Dartdocs Join the chat on Gitter

Installation #

This package is intended to be used as a development dependency for users of 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.

Usage #

This package creates a file corresponding to each .dart file that contains a main function.

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 .dart_tool/build/generated/<your-package>.

Configuration #

There are no configuration options available at this time.

Custom Build Script Integration #

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:

        [vmKernelEntrypointBuilder], toRoot(),
        hideOutput: true,
        // These globs should match your entrypoints only.
        defaultGenerateFor: const InputSet(
            include: const ['bin/**', 'tool/**', 'test/**.vm_test.dart'])),

1.0.4 #

  • Allow analyzer version 0.39.0.

1.0.3 #

  • Allow analyzer version 0.38.0.

1.0.2 #

  • Fix kernel concat ordering to be topological instead of reverse topological.

1.0.1 #

  • Allow analyzer version 0.37.0.

1.0.0 #

  • Support build_modules 2.0.0
    • Define our own vm platform and builders explicitly.
  • Skip trying to compile apps that import known incompatible libraries.

0.1.2 #

  • Increased the upper bound for package:analyzer to <0.37.0.
  • Require Dart SDK >=2.1.0.

0.1.1+5 #

  • Increased the upper bound for package:analyzer to <0.36.0.

0.1.1+4 #

  • Increased the upper bound for package:analyzer to <0.35.0.

0.1.1+3 #

  • Increased the upper bound for package:analyzer to <0.34.0.

0.1.1+2 #

Support package:build_modules version 1.x.x.

0.1.1+1 #

Support package:build version 1.x.x.

0.1.1 #

Support the latest build_modules.

0.1.0 #

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.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  build_vm_compilers: ^1.0.4

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ 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:

import 'package:build_vm_compilers/build_vm_compilers.dart';
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]
Learn more about scoring.

We analyzed this package on Mar 26, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and build_vm_compilers.dart. Packages with multiple examples should provide example/

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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
analyzer >=0.35.0 <0.40.0 0.39.4
build ^1.0.0 1.2.2
build_config >=0.3.0 <0.5.0 0.4.2
build_modules ^2.0.0 2.8.1 2.9.0
path ^1.6.0 1.6.4
pool ^1.3.0 1.4.0
Transitive dependencies
_fe_analyzer_shared 1.0.3
args 1.6.0
async 2.4.1
bazel_worker 0.1.23+1
charcode 1.1.3
checked_yaml 1.0.2
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.16.1
fixnum 0.10.11
glob 1.2.0
graphs 0.2.0
html 0.14.0+3
js 0.6.1+1
json_annotation 3.0.1
logging 0.11.4
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.9.3
pedantic 1.9.0
protobuf 1.0.1
pub_semver 1.4.4
pubspec_parse 0.1.5
scratch_space 0.0.4+2
source_span 1.7.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+14
yaml 2.2.0
Dev dependencies
build_runner ^1.0.0
test ^1.0.0
test_descriptor ^1.1.0