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)

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

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.