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)

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

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.