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)

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

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.