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)

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

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.