Yes, kinda - you can compile to an escript, and mix makes that super easy. But it needs an Erlang environment - you can't easily compile to an executable that will work anywhere, so it can be limiting. If you're happy with that limitation, yes and yes to the latter two questions. Otherwise, I'd stick with what you're using.
I have three specific questions about this:
- Can you make your program executable directly from the command line, by using a shebang and building an executable binary?
- What about the startup time?
- Do you need a lot of "boilerplate", or can you put everything in a single file?