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)

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

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.