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)

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

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.