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)

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

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.