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() {
  let subject = process.new_subject()

  // Spawn a child green thread
  process.spawn(fn() {
    // Send a message back to the parent
    process.send(subject, "Hello, Joe!")
  })

  // Wait for the message to arrive
  echo process.receive(subject, 100)
}

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)

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

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.