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)

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

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.