Dart in a standalone application that does NOT require Chrome installation

node-webkit , brackets-shell and atom-shell are frameworks that allow the user to create stand-alone executable files that use HTML, CSS and JavaScript (Node) for all the code in the application. They do not require pre-installation of any software, as I understand it. I want to use Dart instead of JavaScript. I don’t want to use the chrome app because it requires installing Chrome, if I understand correctly. Is it possible to make a standalone application using Dart? Can DartToJs do this for me?

+8
dart
source share
2 answers

You must have Dart-VM (Dart-Runtime) installed in order to be able to run Dart applications on the command line / server.

As far as I know, there is no way to create a standalone executable, at least not an easy one.

It is technically possible to create an executable file containing Dart-VM, but so far there are no tools available that generate this for you. I do not think that a path using Dart2JS will help much. Dart2JS is primarily aimed at browsers, but I heard that some are trying to use Dart2JS to run Dart code using Node.js, but I don’t know if this really works.

This similar question contains some links that may interest you: Insert Dart into the application

+2
source share

dart2js + node -webkit will definitely do it for you. Just compile your webapp in js, create the correct package.json file and follow the standard directions on the node -webkit github page. There is even a pub package that allows you to use the node -webkit API from the dart (access to the file system, window controls and much more). Find the pub for node_webkit and you will find it. Good luck.

+1
source share

All Articles