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() -> Nil {
  // Run loads of green threads, no problem
  list.range(0, 200_000)
  |> list.each(spawn_greeter)
}

fn spawn_greeter(i: Int) {
  process.spawn(fn() {
    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)

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

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.