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)

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

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.