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)

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

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.