Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribute-able command line applications using Dart #26578

Closed
tejainece opened this issue May 31, 2016 · 5 comments
Closed

Distribute-able command line applications using Dart #26578

tejainece opened this issue May 31, 2016 · 5 comments
Labels

Comments

@tejainece
Copy link

@tejainece tejainece commented May 31, 2016

We need a way to package and distribute Dart command line applications with no dependency on Dart VM.

It is not always guaranteed that the end user's system has DartVM installed.

A way to package DartVM and snapshot into single executable with no external dependencies would be great.

PS: Originally posted here: dart-lang/pub#1419

@anders-sandholm
Copy link
Contributor

@anders-sandholm anders-sandholm commented Jun 9, 2016

Thanks for your suggestion. We don't provide a script or C++ code for bundling the DartVM and a snapshot into a single executable with no external dependencies.

While I do agree that this is generally a useful thing to have, it is not something we are currently planning on offering.

@johnmccutchan
Copy link
Contributor

@johnmccutchan johnmccutchan commented Jun 9, 2016

@rmacnak-google How difficult would it be to do this with the precompilation work?

@rmacnak-google
Copy link
Contributor

@rmacnak-google rmacnak-google commented Jun 9, 2016

It is not a difficult change to statically link a script snapshot or precompiled snapshot into the VM, but this step would require a C compiler. I vaguely recall VisualWorks had a Windows-specific mechanism for putting a snapshot into the VM executable as some kind of resource that would be loaded if available. But I don't see the advantage of distributing a single-file executable over distributing a wrapper script with the VM and a snapshot.

@tejainece
Copy link
Author

@tejainece tejainece commented Jun 9, 2016

I can see how that could get really complicated.

Maybe a build directory containing dartvm executable, the snapshot and a script to run these for starters?

@zoechi
Copy link
Contributor

@zoechi zoechi commented Jun 9, 2016

You would need a dart executable per target platform. You can create a grinder task or batch script that generates that output (generate snapshot, copy dart.exe, generate script tag)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants