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)

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

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.