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)

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

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.