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

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.