Where can I find the interpreter/compiler of Dart language?
Dart's only in an early developer preview stage right now. In some cases, the implementation, specification and documentation contradict each other!
Google is probably going to add Dart support to Chrome in the future, but this is a long-term objective, and hasn't been implemented yet.
You need to download and compile the Dart interpreter/compiler yourself. Dart's Google Code project's wiki has an entry about this, Building Dart, but like the rest of the documentation it's somewhat sparse at the moment.
Currently there are a few options available:
- Run sample code in the Dartboard window at dartlang.org
- Build dartc compiler and run provided htmlconverter.py script which will translate an HTML page with yours
application/dart
blocks into an HTML page with JavaScript code - Build the standalone VM and run Dart code in it
- Wait until Google Chrome will support Dart natively
Update #1
- It was announced that Dart (only small subset in fact) now runs on JVM 7 (using Dart to JVM bytecode compiler).
Update #2
- Instead of building dartc compiler from the sources you can download Dart Editor, an editor based on Eclipse components which supports Dart-to-JavaScript compilation.
- Frog is a new Dart compiler written in Dart; while it was only started recently and still contains some bugs, it generates much more optimized JS code and runs significantly faster than dartc.
Update #3
- Now there is available Chromium with native Dart VM - Dartium, but only in dev mode.
You can download Dart binaries for Windows (dart_bin.exe
) and Linux from Installing Dart.
You can write a small Hello World, hello.dart
:
main() { print('Hello World');}
Then you execute the Dart-script with:
C:\Users\Jonas\dart>dart_bin hello.dartHello World