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)

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

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.