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)

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

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.