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)

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

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.