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)

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

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.