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)

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

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.