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)

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

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.