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)

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

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.