Fasta is a compiler framework for compiling Dart sources to Kernel IR. When Fasta works well, you won‘t even know you’re using it, as it will be transparently integrated in tools like dart, dartanalyzer, dart2js, etc.
Hopefully, you'll notice that Fasta-based tools are fast, with good error messages. If not, please let us know.
Fasta sounds like faster, and that's a promise we intend to keep.
runtime
, so you only need to run this command:./tools/build.py --mode release --arch ia32 runtime
Make sure to define these environment variables, for example, by adding them to ~/.bashrc
:
# Linux DART_SDK=<Location of Dart SDK source check out> export DART_AOT_VM=${DART_SDK}/out/ReleaseIA32/dart export DART_AOT_SDK=${DART_SDK}/out/ReleaseIA32/patched_sdk
# Mac OS X DART_SDK=<Location of Dart SDK source check out> export DART_AOT_VM=${DART_SDK}/xcodebuild/ReleaseIA32/dart export DART_AOT_SDK=${DART_SDK}/xcodebuild/ReleaseIA32/patched_sdk
If you want to help us translate these instructions to another OS, please let us know.
Run dart pkg/fasta/bin/outline.dart pkg/compiler/lib/src/dart2js.dart
Optionally, run dart pkg/kernel/bin/dartk.dart outline.dill
to view the generated outline.
This will generate a file named outline.dill
which contains a serialized reprsentation of the input program excluding method bodies. This is similar to an analyzer summary.
A platform.dill
is a dill file that contains the Dart SDK platform libraries. For now, this is generated with dartk until fasta reaches a higher rate of test passes.
dart pkg/fasta/bin/compile_platform.dart platform.dill
Make sure to define $DART_AOT_SDK
as described above.
dart pkg/fasta/bin/compile.dart test/hello.dart
This will generate program.dill
which can be run this way:
$DART_AOT_VM program.dill
Where $DART_AOT_VM
is defined as described above.
dart pkg/fasta/bin/kompile.dart test/hello.dart
This will generate program.dill
which can be run this way:
$DART_AOT_VM program.dill
Where $DART_AOT_VM
is defined as described above.
Run:
dart -c pkg/testing/bin/testing.dart --config=pkg/fasta/testing.json
dart pkg/fasta/bin/compile.dart pkg/compiler/lib/src/dart2js.dart $DART_AOT_VM pkg/compiler/lib/src/dart2js.dart.dill pkg/fasta/test/test/hello.dart