Add support for standalone executables
- Dominant language
- Dart
- Stars
- 64
- Forks
- 25
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 10
Description
`dart2native` supports generating fully standalone executables, and we should ideally support this as well for standalone compilation. There are some complications, though: on OS X and Windows, standalone executables need to be signed or they'll produce scary and annoying warnings when they're run. This requires that users purchase a trusted certificate for each OS and run a command to sign the generated executables with those certificates. See details for [OS X](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html) and [Windows](https://mkaz.blog/code/code-signing-a-windows-application/).
I think the best way to handle this would be to have `pkg.standaloneWindowsCert` and `pkg.standaloneMacOSCert` fields and, if those fields are set, generate full standalone executables and sign them. I don't think it's especially useful to generate unsigned executables; they won't be much faster than native snapshots, and the generated warnings will be very frustrating.
Note that for Linux, this is much easier, since code signing isn't required. Given that all three supported operating systems are substantially different here, I'm going to split this up into three tasks:
* [ ] Linux
* [ ] Windows
* [ ] Mac OS
Contributor guide
Assessment
This issue has not been assessed yet.