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)

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

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.