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)

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

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.