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)

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

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.