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)

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

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.