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)

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

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.