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)

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