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)

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

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.