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)

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

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.