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
Comments
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. |
@rmacnak-google How difficult would it be to do this with the precompilation work? |
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. |
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? |
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) |
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
The text was updated successfully, but these errors were encountered: