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)

  • Bruno Michel
  • Sgregory42
  • Stephen Belanger
  • Andrea Bueide
  • Guillaume Hivert
  • yoshie
  • erlend-axelsson
  • Felix
  • Bjoern Paschen
  • Benjamin Moss
  • Giacomo Cavalieri
  • lidashuang
  • Hazel
  • Andrew Varner
  • Jørgen Andersen
  • Francis Hamel
  • Brett Kolodny
  • Oliver Medhurst
  • dagi3d
  • Matt Heise
  • Lexx
  • Christopher Keele
  • Tudor Luca
  • Gabriel Vincent
  • Jachin Rupe
  • Antharuu
  • Tim Brown
  • Kristoffer Grönlund
  • Barry Moore II
  • Dave Lucia
  • John Strunk
  • jooaf
  • Dan
  • Mark Holmes
  • Noah Betzen
  • Fede Esteban
  • Carlo Munguia
  • Zsolt Kreisz
  • Cam Ray
  • Volker Rabe
  • Leonardo Donelli
  • Aleksei Gurianov
  • Billuc
  • Jake Wood
  • Jimpjorps™
  • Renovator
  • nunulk
  • Ian González
  • Weizheng Liu
  • Rupus Reinefjord
  • Joey Trapp
  • inoas
  • Coder
  • Matt Savoia
  • Falk Pauser
  • Redmar Kerkhoff
  • MoeDev
  • Saša Jurić
  • Ameen Radwan
  • Hans Raaf
  • Wilson Silva
  • Donnie Flood
  • Seve Salazar
  • Mark Dodwell
  • Ben Martin
  • David Cornu
  • Ethan Olpin
  • shxdow
  • Alexandre Del Vecchio
  • Chris Lloyd
  • Danny Arnold
  • Jasmine Tang
  • Comamoca
  • Alex Manning
  • renatillas
  • Rico Leuthold
  • ZWubs
  • Yasuo Higano
  • Sean Roberts
  • Jonas E. P
  • Eileen Noonan
  • Костя
  • Chris Ohk
  • METATEXX GmbH
  • Chew Choon Keat
  • Jerred Shepherd
  • Russell Clarey
  • Tristan de Cacqueray
  • Ajit Krishna
  • Tobias Ammann
  • Joseph Myers
  • Rohan
  • Baqtiar
  • Graham
  • Jen Stehlik
  • Jake Cleary
  • Robert Ellen
  • James Birtles
  • Natalie Rose
  • Eric Koslow
  • Dylan Carlson
  • Andy Young
  • Adam Brodzinski
  • Tristan Sloughter
  • Rotabull
  • Steinar Eliassen
  • Joshua Steele
  • Giovanni Kock Bonetti
  • David Pendray
  • Alex Kelley
  • Jojor
  • Lukas Bjarre
  • Adam Daniels
  • Rintaro Okamura
  • Jon Lambert
  • Mario Vellandi
  • Ed Hinrichsen
  • Justin Lubin
  • Brian Glusman
  • Samu
  • Nicklas Sindlev Andersen
  • Thomas Coopman
  • N. G. Scheurich
  • Wundersmiths
  • Hannes Nevalainen
  • Aaron Gunderson
  • Kemp Brinson
  • Marius Kalvø
  • Comet
  • ErikML
  • Christopher Jung
  • Hazel Bachrach
  • Jon Charter
  • simone
  • Grant Everett
  • Ben Myles
  • Sammy Isseyegh
  • Yamen Sader
  • Tomasz Kowal
  • Clifford Anderson
  • Tom Hughes
  • Michael Duffy
  • Ruslan Ustitc
  • Will Ramirez
  • Luke Amdor
  • bucsi
  • Chris Donnelly
  • Rodrigo Álvarez
  • Walton Hoops
  • Edon Gashi
  • Sebastian Porto
  • Jimmy Utterström
  • Rob Durst
  • Thomas Crescenzi
  • Joey Kilpatrick
  • Matt Mullenweg
  • Pete Jodo
  •  Aïssata Maïga
  • Richard Viney
  • Anthony Scotti
  • Krzysztof Gasienica-Bednarz
  • Nomio
  • Jean-Luc Geering
  • Ernesto Malave
  • Niket Shah
  • Erik Terpstra
  • OldhamMade
  • Abel Jimenez
  • Éber Freitas Dias
  • Guillaume Heu
  • André Mazoni
  • Ninaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  • Diemo Gebhardt
  • Reilly Tucker Siemens
  • Julian Hirn
  • tommaisey
  • Henry Warren
  • Carlos Saltos
  • Kevin Schweikert
  • Martin Poelstra
  • Damir Vandic
  • Oliver Tosky
  • Isaac McQueen
  • Dan Strong
  • Guilherme de Maio
  • Mike Roach
  • Renato Massaro
  • Stefan
  • Scott Zhu Reeves
  • Alembic
  • Christopher David Shirk
  • Mark Rudolph
  • Sam Zanca
  • fruno
  • Anthony Maxwell
  • Pedro Correa
  • G-J van Rooyen
  • Timo Sulg
  • evanasse
  • Olaf Sebelin
  • Scott Trinh
  • Shane Poppleton
  • Ahmad Alhashemi
  • Matt Van Horn
  • Corentin J.
  • Brad Mehder
  • Nikolas
  • Dan Gieschen Knutson
  • Fernando Farias
  • John Björk
  • Natanael Sirqueira
  • bgw
  • Ian M. Jones
  • Qdentity
  • Evaldo Bratti
  • Jérôme Schaeffer
  • optizio
  • Strandinator
  • Robert Malko
  • Dan Dresselhaus
  • Sean Cribbs
  • Henning Dahlheim
  • Fabrizio Damicelli
  • Constantin Angheloiu
  • Ed Rosewright
  • Jean Niklas L'orange
  • Viv Verner
  • David Bernheisel
  • eli
  • Leon Qadirie
  • Theo Harris
  • Sakari Bergen
  • Arya Irani
  • Michael Jones
  • upsidedowncake
  • Paul Guse
  • Chris Olsen
  • Ivar Vong
  • Rasmus
  • Jean-Marc QUERE
  • Bruno Konrad
  • MzRyuKa
  • Adam Johnston
  • Danielle Maywood
  • Chris King
  • Geir Arne Hjelle
  • Florian Kraft
  • Arthur Weagel
  • Leo Ostera
  • Benjamin Kane
  • Lennon Day-Reynolds
  • Patrick Wheeler
  • Sam Aaron
  • Bruce Williams
  • n8n - Workflow Automation
  • metame
  • Shawn Drape
  • iskrisis
  • Cole Lawrence
  • Filip Figiel
  • Jan Pieper
  • Dylan Anthony
  • Raúl Chouza
  • Ben Marx
  • Isaac Harris-Holt
  • Valerio Viperino
  • Mikael Karlsson
  • Christopher De Vries
  • Azure Flash
  • Jonas Hedman Engström
  • Lee Jarvis
  • ad-ops
  • Julian Schurhammer
  • CJ Salem
  • Emma
  • Pattadon Sa-ngasri
  • Stephane Rangaya
  • NicoVIII
  • Igor Montagner
  • KamilaP
  • Hubert Małkowski
  • frankwang
  • ollie
  • Chris Vincent
  • Manuel Rubio
  • Michal Timko
  • Adi Iyengar
  • Joseph Lozano
  • Cris Holm
  • Tom Schuster
  • Landon
  • Cameron Presley
  • Johan Strand
  • Ripta Pasay
  • Henrik Tudborg
  • Adrian Mouat
  • Sigma
  • Zsombor Gasparin
  • Constantin (Cleo) Winkler
  • James MacAulay
  • Shritesh Bhattarai
  • Peter Rice
  • Alex Houseago
  • contra1337
  • Danny Martini
  • Christopher Dieringer
  • Michael Mazurczak
  • Chris Rybicki
  • Bjarte Aarmo Lund
  • Thomas
  • Leah Ulmschneider
  • Iain H
  • Kero van Gelder
  • Jean-Adrien Ducastaing
  • Hammad Javed
  • Max McDonnell
  • Robert Attard
  • Scott Wey
  • Alexander Stensrud
  • Adam Wyłuda
  • Martin Rechsteiner
  • Evan Johnson
  • Sławomir Ehlert
  • Charlie Govea
  • ggobbe
  • Philpax
  • Vassiliy Kuzenkov
  • Aboio
  • Isaac
  • Mark Markaryan
  • Gavin Panella
  • Chad Selph
  • Matthew Jackson
  • Hari Mohan
  • Jan Skriver Sørensen
  • Savva
  • Antonio Farinetti
  • Brett Cannon
  • Martin Janiczek
  • Kuma Taro

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.