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)

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

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.