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)

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

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.