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)

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

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.