The power of a type system, the expressiveness of functional programming, and the reliability of the highly concurrent, fault tolerant Erlang runtime, with a familiar and modern syntax.

import gleam/io

pub fn main() {
  io.println("hello, friend!")
}

Kindly supported by

Reliable and scalable

Running on the battle-tested Erlang virtual machine that powers planet-scale systems such as WhatsApp and Ericsson, Gleam is ready for workloads of any size.

Thanks to its multi-core actor based concurrency system that can run millions of concurrent green threads, fast immutable data structures, and a concurrent garbage collector that never stops the world, your service can scale and stay lightning fast with ease.

pub fn main() {
  // Run loads of green threads, no problem
  list.range(0, 200_000)
  |> list.each(fn(i) {
    let n = int.to_string(i)
    io.println("Hello from " <> n)
  })
}

Ready when you are

Gleam comes with compiler, build tool, formatter, editor integrations, and package manager all built in, so creating a Gleam project is just running gleam new

As part of the wider BEAM ecosystem, Gleam programs can use thousands of published packages, whether they are written in Gleam, Erlang, or Elixir.

➜ (main) gleam add gleam_json
  Resolving versions
Downloading packages
 Downloaded 2 packages in 0.01s
      Added gleam_json v0.5.0
➜ (main) gleam test
 Compiling thoas
 Compiling gleam_json
 Compiling app
  Compiled in 1.67s
   Running app_test.main
.
1 tests, 0 failures

Here to help

No null values, no exceptions, clear error messages, and a practical type system. Whether you're writing new code or maintaining old code, Gleam is designed to make your job as fun and stress-free as possible.

error: Unknown record field

  ┌─ ./src/app.gleam:8:16
  │
8 │ user.alias
  │     ^^^^^^ Did you mean `name`?

The value being accessed has this type:
    User

It has these fields:
    .name

Multilingual

Gleam makes it easy to use code written in other BEAM languages such as Erlang and Elixir, so there's a rich ecosystem of thousands of open source libraries for Gleam users to make use of.

Gleam can additionally compile to JavaScript, enabling you to use your code in the browser, or anywhere else JavaScript can run. It also generates TypeScript definitions, so you can interact with your Gleam code confidently, even from the outside.

@external(erlang, "Elixir.HPAX", "new")
pub fn new(size: Int) -> Table



pub fn register_event_handler() {
  let el = document.query_selector("a")
  element.add_event_listener(el, fn() {
    io.println("Clicked!")
  })
}

Friendly 💜

As a community, we want to be friendly too. People from around the world, of all backgrounds, genders, and experience levels are welcome and respected equally. See our community code of conduct for more.

Black lives matter. Trans rights are human rights. No nazi bullsh*t.

a soft wavey boundary between two sections of the website

Lovely people

If you enjoy Gleam consider becoming a sponsor (or tell your boss to)

  • Leah Ulmschneider
  • G-J van Rooyen
  • Anthony Maxwell
  • Fede Esteban
  • Chad Selph
  • Qdentity
  • Marius Kalvø
  • Tomasz Kowal
  • Manuel Rubio
  • Ed Hinrichsen
  • Sammy Isseyegh
  • Julian Hirn
  • Daniil Nevdah
  • tymak
  • Jen Stehlik
  • Theo Harris
  • OldhamMade
  • Matt Savoia
  • Martin Rechsteiner
  • Endo Shogo
  • Joshua Steele
  • Jon Lambert
  • Robert Malko
  • Hubert Małkowski
  • Corentin J.
  • Jonas Hedman Engström
  • Rodrigo Álvarez
  • Sebastian Porto
  • Fabrizio Damicelli
  • Tim Brown
  • Michael Jones
  • Bjoern Paschen
  • re.natillas
  • Victor Rodrigues
  • Hazel Bachrach
  • Steinar Eliassen
  • Jean-Adrien Ducastaing
  • Ruslan Ustitc
  • Walton Hoops
  • Ernesto Malave
  • Brett Cannon
  • Jørgen Andersen
  • Martin Poelstra
  • Dan Dresselhaus
  • Jean-Luc Geering
  • Geir Arne Hjelle
  • Alex Houseago
  • Lily Rose
  • Leandro Ostera
  • Matt Mullenweg
  • takasehideki
  • James MacAulay
  • Isaac Harris-Holt
  • Justin Lubin
  • Mat Warger
  • Rintaro Okamura
  • Max McDonnell
  • Matthew Whitworth
  • Hayleigh Thompson
  • Jerred Shepherd
  • Viv Verner
  • Richard Viney
  • Cameron Presley
  • devinalvaro
  • Coder
  • Diemo Gebhardt
  • Chris Ohk
  • Jan Skriver Sørensen
  • Weizheng Liu
  • Nick Reynolds
  • Benjamin Kane
  • Scott Trinh
  • Rasmus
  • Sean Roberts
  • Alembic
  • Krzysztof Gasienica-Bednarz
  • Cole Lawrence
  • NicoVIII
  • ZWubs
  • Arya Irani
  • ad-ops
  • ollie
  • Alex Manning
  • METATEXX GmbH
  • Comet
  • Charlie Duong
  • Jérôme Schaeffer
  • Isaac
  • Adrian Mouat
  • Ethan Olpin
  • Carlos Saltos
  • Ian González
  • optizio
  • Kemp Brinson
  • EMR Technical Solutions
  • Vic Valenzuela
  • Mike Roach
  • Bjarte Aarmo Lund
  • Scott Wey
  • André Mazoni
  • Jacob Lamb
  • Reilly Tucker Siemens
  • yoshi~
  • Matt Van Horn
  • Pete Jodo
  • Georg Hartmann
  • Sean Cribbs
  • Hans Raaf
  • Paul Guse
  • Kramer Hampton
  • Jan Pieper
  • Graham Vasquez
  • Aaron Gunderson
  • bucsi
  • Christopher Jung
  • Anthony Khong
  • Georgi Martsenkov
  • Kero van Gelder
  • Kevin Schweikert
  • Renato Massaro
  • Pierrot
  • Leon Qadirie
  • Ben Martin
  • bgw
  • Henrik Tudborg
  • marcusandre
  • David Bernheisel
  • Danny Arnold
  • Adi Iyengar
  • Nathaniel Knight
  • Lukas Bjarre
  • Ocean
  • Giovanni Kock Bonetti
  • Redmar Kerkhoff
  • Andrew Varner
  • Alexandre Del Vecchio
  • Valerio Viperino
  • Volker Rabe
  • Michael McClintock
  • Iain H
  • Adam Brodzinski
  • Michael Duffy
  • Ben Myles
  • Mariano Uvalle
  • Bruno Michel
  • Scott Zhu Reeves
  • NFIBrokerage
  • Gabriel Vincent
  • Metin Emiroğlu
  • Thomas
  • lidashuang
  • David Cornu
  • Brad Mehder
  • Matthew Jackson
  • Henning Dahlheim
  • Rotabull
  • Felix
  • Zsombor Gasparin
  • Brian Dawn
  • Sławomir Ehlert
  • James Birtles
  • Gavin Panella
  • Pedro Correa
  • Guilherme de Maio
  • Dennis Dang
  • Lennon Day-Reynolds
  • tommaisey
  • Christopher Keele
  • sambit
  • dennistruemper
  • Ben Marx
  • Clifford Anderson
  • Mark Dodwell
  • Cam Ray
  • Jean-Marc QUERE
  • Chris King
  • Natanael Sirqueira
  • Fernando Farias
  • Dylan Anthony
  • Rico Leuthold
  • Dan
  • Chris Donnelly
  • Oliver Medhurst
  • Damir Vandic
  • simone
  • jiangplus
  • Rupus Reinefjord
  • Sean Jensen-Grey
  • Timo Sulg
  • KamilaP
  • Comamoca
  • Sam Zanca
  • Constantin (Cleo) Winkler
  • Erik Terpstra
  • Florian Kraft
  • n8n - Workflow Automation
  • Michael Mazurczak
  • Anthony Scotti
  • Patrick Wheeler
  • Thomas Coopman
  • Yamen Sader
  • Chris Rybicki
  • Antharuu
  • Emma
  • Johan Strand
  • jooaf
  • Ripta Pasay
  • Giacomo Cavalieri
  • Christopher David Shirk
  • Barry Moore
  • Edon Gashi
  • Yasuo Higano
  • Lee Jarvis
  • Nikolai Steen Kjosnes
  • Matt Heise
  • Tudor Luca
  • Benjamin Moss
  • Stephen Belanger
  • Hammad Javed
  • metame
  • Eric Koslow
  • Niket Shah
  • Brian Glusman
  • Nomio
  • Danny Martini
  • Chew Choon Keat
  • Adam Johnston
  • nunulk
  • ErikML
  • Charlie Govea
  • Joey Kilpatrick
  • Alexander Koutmos
  • Alexander Stensrud
  • Carlo Munguia
  • Martin Janiczek
  • Luna
  • Tristan Sloughter
  • Olaf Sebelin
  • Evan Johnson
  • Stefan
  • Ajit Krishna
  • Mikael Karlsson
  • Tristan de Cacqueray
  • Henry Warren
  • Eileen Noonan
  • Mark Holmes
  • Thomas Ernst
  • Seve Salazar
  • Dylan Carlson
  • Azure Flash
  • Savva
  • Daniel S Jeremiah
  • Matt Robinson
  • Adam Wyłuda
  • Shane Poppleton
  • Willyboar
  • Ameen Radwan
  • Stefan Hagen
  • evanasse
  • Arthur Weagel
  • Mark Markaryan
  • Grant Everett
  • Julian Schurhammer
  • Peter Rice
  • Luke Amdor
  • Saša Jurić
  • erlend-axelsson
  • Joey Trapp
  • John Pavlick
  • Aleksei Gurianov
  • Hannes Schnaitter
  • Brett Kolodny
  • Robert Attard
  • John Björk
  • eli
  • Jean Niklas L'orange
  • Nicklas Sindlev Andersen
  • Bartek Górny
  • ggobbe
  • Kritsada Sunthornwutthikrai
  • Guillaume Heu
  • TA
  • Austin Beau Bodzas
  • Dan Strong
  • Leonardo Donelli
  • Chris Lloyd
  • Danielle Maywood
  • István Bozsó
  • Sigma
  • inoas
  • Tom Hughes
  • MzRyuKa
  • Ian M. Jones
  • Renovator
  • Oliver Tosky
  • Vassiliy Kuzenkov
  • Nick Chapman
  • Matthias Nüßler
  • Jakob Ladegaard Møller
  • Jimpjorps™
  • Abel Jimenez
  • Tom Schuster
  • Lexx
  • Igor Montagner
  • Ivar Vong
  • Christopher De Vries
  • Wilson Silva
  • Jake Wood
  • Andrea Bueide
  • Bruce Williams
  • Evaldo Bratti
  • Jojor
  • Jake Cleary
  • Heyang Zhou
  • Strandinator
  • Russell Clarey
  • Max Bridges
  • Race Williams
  • Christopher Dieringer
  • Jonas E. P
  • Isaac McQueen
  • Filip Figiel
  • Philpax
  • Éber Freitas Dias
  • Robert Ellen
  • Hannes Nevalainen
  • Sam Aaron
  • Donnie Flood
  • Daigo Shitara
  • frankwang
  • Chris Vincent
  • John Strunk
  • Ninaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  • Ben
  • CJ Salem
  • Joseph Lozano
  • Francis Hamel
  • MoeDev
  • Noah Betzen

You're still here?

Well, that's all this page has to say. Maybe you should go read the language tour!

Let's go!

Wanna keep in touch?

Subscribe to the Gleam newsletter

We send emails at most a few times a year, and we'll never share your email with anyone else.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.