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)

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

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.