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() {
  // Run loads of green threads, no problem
  list.range(0, 200_000)
  |> list.each(fn(i) {
    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)

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

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.