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)

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

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.