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)

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