9

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

Phlox Midas
  • 4,093
  • 4
  • 35
  • 56

2 Answers2

2

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

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

It is technically possible to create an executable that contains the Dart-VM but there are no tools available yet that generate that for you. I don't think the path using Dart2JS will help much. Dart2JS aims primarily at browsers but I have heard that some try to use Dart2JS to run Dart code with Node.js but I don't know if that really works.

This similar question contains some links that may be of interest to you: Embedding Dart into application

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • "As far as I know there is no way to create a standalone executable, at least no easy one." - not the answer I was hoping for but I guess that's where we are at the moment. Thanks for the information. – Phlox Midas May 14 '14 at 10:36
2

dart2js + node-webkit will definitely do this for you. Just compile your webapp to js, make a proper package.json file and follow the standard directions on the node-webkit github page. There's even a pub package that let's you use the node-webkit API from dart (filesystem access, window controls, and whatnot). Search pub for node_webkit and you'll find it. Good luck.

darkkiero
  • 43
  • 3