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)

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

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.