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)

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

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.