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)

  • Khalid
  • Sebastian Porto
  • Robert Malko
  • Kuma Taro
  • Strandinator
  • Mark Markaryan
  • Jan Pieper
  • Antonio Farinetti
  • Florian Kraft
  • Francis Hamel
  • Tudor Luca
  • Mikael Karlsson
  • Peter Rice
  • ginkogruen
  • Benjamin Moss
  • Steinar Eliassen
  • n8n - Workflow Automation
  • Jake Cleary
  • Rupus Reinefjord
  • Daniil Nevdah
  • Jachin Rupe
  • Rodrigo Álvarez
  • OldhamMade
  • Reilly Tucker Siemens
  • Adi Iyengar
  • Will Ramirez
  • Chris Lloyd
  • Constantin (Cleo) Winkler
  • Christian Visintin
  • blurrcat
  • Adam Johnston
  • Marius Kalvø
  • Erik Terpstra
  • simone
  • Ben Martin
  • Kile Deal
  • NicoVIII
  • Krzysztof Gasienica-Bednarz
  • Niket Shah
  • Edon Gashi
  • Alex Kelley
  • David Pendray
  • Arya Irani
  • Felix
  • Sammy Isseyegh
  • Joey Kilpatrick
  • Thomas
  • Martin Janiczek
  • Jørgen Andersen
  • Philpax
  • Joshua Steele
  • Yasuo Higano
  • Alistair Smith
  • Aboio
  • jstcz
  • Caleb Falcione
  • Ernesto Malave
  • Lukas Bjarre
  • Adam Brodzinski
  • Isaac
  • André Mazoni
  • ErikML
  • Brett Cannon
  • dagi3d
  • Kramer Hampton
  • Nick Leslie
  • Hans Raaf
  • Carlo Munguia
  • Djordje Djukic
  • evanasse
  • Sigma
  • lidashuang
  • Abel Jimenez
  • shxdow
  • Julian Schurhammer
  • Anthony Scotti
  • Hazel Bachrach
  • Alex Houseago
  • inoas
  • Ed Rosewright
  • Nomio
  • Andrew Brown
  • Dan Strong
  • Aaron Zuspan
  • Harry Bairstow
  • Jonas Hedman Engström
  • Dan Dresselhaus
  • Pete Jodo
  • Landon
  • Julian Hirn
  • Eric Koslow
  • Cameron Presley
  • Oliver Medhurst
  • Jerred Shepherd
  • Shawn Drape
  • Benjamin Kane
  • Dylan Carlson
  • Michael Mazurczak
  • Arto Bendiken
  • Ivar Vong
  • Jean-Luc Geering
  • Daniele
  • Corentin J.
  • Fede Esteban
  • Matt Savoia
  • Jonas Ellehave Brygger
  • Saša Jurić
  • Eleina Mironia
  • Rasmus
  • Christopher De Vries
  • Chris Ohk
  • Leonardo Donelli
  • Matt Van Horn
  • Nicklas Sindlev Andersen
  • Redmar Kerkhoff
  • Timo Sulg
  • Ian González
  • Yamen Sader
  • Xucong Zhan
  • Optizio
  • Henry Warren
  • Rocka Nutrition GmbH
  • Stefan
  • Oliver Tosky
  • Brett Kolodny
  • Olaf Sebelin
  • John Downey
  • Evan Johnson
  • Renovator
  • Iain H
  • Jon Lambert
  • bgw
  • Falk Pauser
  • Patrick Wheeler
  • Matt Heise
  • KamilaP
  • James Birtles
  • Barry Moore II
  • David Bernheisel
  • Danny Martini
  • Nikolai Steen Kjosnes
  • Diemo Gebhardt
  • Martin Poelstra
  • Johanna Larsson
  • Nathaniel Johnson
  • Kero van Gelder
  • Bruce Williams
  • John Strunk
  • Kemp Brinson
  • Tobias Ammann
  • Stephane Rangaya
  • Manuel Rubio
  • Aliaksiej Homza
  • Nigel Baillie
  • Jérôme Schaeffer
  • Adam Daniels
  • Henrik Tudborg
  • Coder
  • Michael Jones
  • Kevin Schweikert
  • Alexandre Del Vecchio
  • Nessa Jane Marin
  • Guilherme de Maio
  • Robert Ellen
  • R.Kawamura
  • Pedro Correa
  • Johan Strand
  • Jake Wood
  • METATEXX GmbH
  • Cole Lawrence
  • Carlos Saltos
  • Gabriela Sartori
  • Grant Everett
  • Hari Mohan
  • iskrisis
  • erlend-axelsson
  • Sam Aaron
  • Alexander Stensrud
  • Atuin
  • Rintaro Okamura
  • Sean Cribbs
  • Kirill Morozov
  • Rotabull
  • Chew Choon Keat
  • Lennon Day-Reynolds
  • Billuc
  • Ajit Krishna
  • Evaldo Bratti
  • Henning Dahlheim
  • jooaf
  • Rohan
  • Jojor
  • John Björk
  • Giovanni Kock Bonetti
  • Andrew Varner
  • Sam Zanca
  • Michael G
  • Fabrizio Damicelli
  • Jan Skriver Sørensen
  • Hannes Nevalainen
  • Eileen Noonan
  • Qdentity
  • Heyang Zhou
  • Tim Brown
  • Russell Clarey
  • Andy Young
  • Cyphernil
  • Dylan Anthony
  • Thomas Coopman
  • ZWubs
  • Adrian Mouat
  • Sławomir Ehlert
  • Aleksei Gurianov
  • Thomas Crescenzi
  • albertchae
  • Jen Stehlik
  • Dan
  • Tomasz Kowal
  • Mike Roach
  • Nick Papadakis
  • tommaisey
  • Giacomo Cavalieri
  • Scott Wey
  • Comamoca
  • David Cornu
  • Wavering Ana
  • Tristan Sloughter
  • Ruslan Ustitc
  • bucsi
  • Matthew Jackson
  • Isaac McQueen
  • Shunji Lin
  • Paul Guse
  • Max Duval
  • Max McDonnell
  • Hubert Małkowski
  • Christopher Keele
  • Shane Poppleton
  • Viv Verner
  • Bruno Konrad
  • Natalie Rose
  • Michal Timko
  • Luke Amdor
  • Alex Manning
  • James MacAulay
  • Edgar Gomes
  • G-J van Rooyen
  • Danny Arnold
  • Éber Freitas Dias
  • Erik Ohlsson
  • Martin Fojtík
  • ollie
  • Leah Ulmschneider
  • Jean Niklas L'orange
  • Brad Mehder
  • rebecca
  • Mark Holmes
  • Scott Trinh
  • Seve Salazar
  • Clifford Anderson
  • Volker Rabe
  • Race
  • Sakari Bergen
  • Guillaume Heu
  • Geir Arne Hjelle
  • Jon Charter
  • Renato Massaro
  • Justin Lubin
  • Robert Attard
  • Kristoffer Grönlund
  • Joey Trapp
  • Lexx
  • Ripta Pasay
  • Nikolas
  • Brian Glusman
  • Matt Mullenweg
  • Sgregory42
  • Filip Figiel
  • Ethan Olpin
  • MoeDev
  • Leon Qadirie
  • Markus Wesslén
  • Jan Fooken
  • Martin Rechsteiner
  • Dan Piths
  • Igor Montagner
  • Chad Selph
  • Dan Gieschen Knutson

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.