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)

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

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.