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)

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

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.