Skip to content
Tech News
← Back to articles

Gleam v1.17.0 Released

read original get Gleam Programming Language Book → more articles
Why This Matters

The release of Gleam v1.17.0 introduces a streamlined way to create single-file executable scripts for Erlang and JavaScript runtimes, enhancing ease of distribution and deployment. This update is significant for developers seeking more efficient packaging options, especially for small command-line tools, and underscores Gleam's commitment to improving developer experience across platforms.

Key Takeaways

Gleam is a type safe and scalable language for the Erlang virtual machine and JavaScript runtimes. Today Gleam v1.17.0 has been published.

Gleam Gathering

But first: the first videos from the first ever all-Gleam conference have been released! You can view them on the Gleam Gathering YouTube account. The event was a roaring success and loads of fun. Stay tuned for news of the next one in 2027!

Right, back to the release coverage.

BEAM escripts

When running on the Erlang virtual machine Gleam code is compiled to a series of .beam files, each of which contains the bytecode for a single Gleam module. This works fine for programs distributed or installed using package managers, containers, or other such systems, but having many files to share is a little inconvenient for sharing small command-line programs.

In the JavaScript world this problem is solved using a "bundler", a program that takes many JavaScript modules and combines them into a single file. This single file can be copied to and run on any computer that has a JavaScript runtime installed (such as NodeJS, Deno, or Bun). Erlang has a similar solution: escripts. Much like a JavaScript bundle, an escript is a single file that contains all the modules of a program in the form of pre-compiled bytecode, and it can be run on any computer that has Erlang installed.

The Erlang build tool has a convenient command for creating an escript, but for Gleam programmers the escript creation process has not been as straightforward. This release brings the gleam export escript command, which will compile the project, verify it has a valid main function, and build the escript file from the compiled bytecode.

louis ~/src/my_project $ gleam export escript Compiling gleam_stdlib Compiling my_project Compiled in 0.48s Your escript has been generated to /home/louis/src/my_project/my_project. louis ~/src/my_project $ ./my_project Hello from my_project!

Highlight references

... continue reading