Packaging a Gleam app into a single executable
6 hours ago
- #Gleam
- #Executables
- #Functional Programming
- Gleam is a functional programming language that compiles to Erlang and JavaScript.
- Gleam does not natively support creating executables, but there are workarounds.
- For Erlang target: Gleescript creates an executable requiring Erlang VM on the host machine.
- For Erlang target: Burrito wraps Elixir/Erlang apps into self-contained executables without requiring Erlang VM.
- For JavaScript target: Deno compile bundles Gleam code into a single executable with Deno runtime.
- For JavaScript target: Node SEA (Single Executable Applications) is experimental and supports CommonJS.
- For JavaScript target: Bun build --compile is fast and convenient, bundling everything into a single executable.
- Nexe is another option for compiling Node.js applications into a single executable.
- Bun and Deno produce larger executables due to bundled runtimes (~100MB).