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)

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

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.