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

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.