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)

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