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)

  • Arthur Weagel
  • Aboio
  • Christopher David Shirk
  • Brett Cannon
  • John Björk
  • Ed Hinrichsen
  • Max McDonnell
  • Matt Savoia
  • Evan Johnson
  • Scott Trinh
  • Ram Prasanth Udhaya Baskar
  • Matt Heise
  • Felix
  • MoeDev
  • nunulk
  • Justin Lubin
  • Peter Rice
  • Sammy Isseyegh
  • Stephane Rangaya
  • Volker Rabe
  • Emma
  • Renato Massaro
  • John Strunk
  • Shritesh Bhattarai
  • Graham
  • Henning Dahlheim
  • Ninaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  • Joshua Steele
  • Ian M. Jones
  • Alexander Stensrud
  • Carlos Saltos
  • Adam Brodzinski
  • Robert Malko
  • Ethan Olpin
  • Sean Roberts
  • Steinar Eliassen
  • bgw
  • Alex Houseago
  • Chris Lloyd
  • Tom Schuster
  • Chris Ohk
  • tommaisey
  • Saša Jurić
  • Sam Aaron
  • Arya Irani
  • Dan
  • Julian Schurhammer
  • Mario Vellandi
  • Evaldo Bratti
  • Russell Clarey
  • Matt Mullenweg
  • Mike Roach
  • Jojor
  • Kile Deal
  • Sławomir Ehlert
  • Matt Van Horn
  • Renovator
  • Manuel Rubio
  • Ameen Radwan
  • Vassiliy Kuzenkov
  • Isaac
  • Joey Trapp
  • Brett Kolodny
  • Lukas Bjarre
  • Martin Janiczek
  • Ben Martin
  • lidashuang
  • James MacAulay
  • Falk Pauser
  • Christopher Jung
  • Adam Johnston
  • Dylan Carlson
  • Martin Poelstra
  • Hazel Bachrach
  • Henry Warren
  • Jean Niklas L'orange
  • jstcz
  • Bruce Williams
  • The Sentience Company
  • Cole Lawrence
  • Constantin (Cleo) Winkler
  • James Birtles
  • Luke Amdor
  • Jean-Adrien Ducastaing
  • METATEXX GmbH
  • upsidedowncake
  • DevEvil
  • Lennon Day-Reynolds
  • Reilly Tucker Siemens
  • Edon Gashi
  • Christopher Dieringer
  • Brian Glusman
  • Leonardo Donelli
  • Seve Salazar
  • Cameron Presley
  • Hubert Małkowski
  • Adi Iyengar
  • Scott Wey
  • Leah Ulmschneider
  • Valerio Viperino
  • Giacomo Cavalieri
  • Thomas Crescenzi
  • Pattadon Sa-ngasri
  • Jon Lambert
  • Corentin J.
  • Race
  • jooaf
  • Cris Holm
  • Weizheng Liu
  • Grant Everett
  • Ed Rosewright
  • Chris Olsen
  • Strandinator
  • Thomas
  • Andrii Shupta
  • Oliver Medhurst
  • Aleksei Gurianov
  • Hari Mohan
  • Jørgen Andersen
  • Gabriel Vincent
  • Bjarte Aarmo Lund
  • Joseph Myers
  • David Bernheisel
  • Oliver Tosky
  • Dan Dresselhaus
  • Timo Sulg
  • G-J van Rooyen
  • Ajit Krishna
  • Florian Kraft
  • Will Ramirez
  • Johan Strand
  • Christopher Keele
  • Rob Durst
  • Erik Ohlsson
  • Joey Kilpatrick
  • Diemo Gebhardt
  • Wundersmiths
  • Kristoffer Grönlund
  • Carlo Munguia
  • Fernando Farias
  • Danny Martini
  • Landon
  • Evan MORVAN
  • Natanael Sirqueira
  • N. G. Scheurich
  • Billuc
  • Stefan
  • Gabriela Sartori
  • ad-ops
  • Krzysztof Gasienica-Bednarz
  • Nicklas Sindlev Andersen
  • Dan Strong
  • blurrcat
  • Eileen Noonan
  • Christian Visintin
  • Richard Viney
  • Hammad Javed
  • Ripta Pasay
  • Alex Kelley
  • Benjamin Kane
  • Jérôme Schaeffer
  • Philpax
  • Natalie Rose
  • Walton Hoops
  • Matthew Jackson
  • David Cornu
  • Jean-Luc Geering
  • Viv Verner
  • Kramer Hampton
  • Tobias Ammann
  • Michael Duffy
  • Ben Myles
  • Isaac McQueen
  • Martin Rechsteiner
  • Tim Brown
  • Ryan Moore
  • Qdentity
  • Mark Markaryan
  • Rohan
  • Mikael Karlsson
  • Ian González
  • Giovanni Kock Bonetti
  • Hannes Nevalainen
  • Jon Charter
  • Bjoern Paschen
  • Alembic
  • Joseph Lozano
  • Pedro Correa
  • Sgregory42
  • Sam Zanca
  • Hans Raaf
  • Baqtiar
  • Fabrizio Damicelli
  • Brad Mehder
  • Danny Arnold
  • Jen Stehlik
  • Scott Zhu Reeves
  • Jake Cleary
  • Sean Cribbs
  • Cam Ray
  • Lexx
  • André Mazoni
  • Paul Guse
  • Sebastian Porto
  • Isaac Harris-Holt
  • Marius Kalvø
  • Igor Montagner
  • Kemp Brinson
  • Jimmy Utterström
  • Bruno Konrad
  • erlend-axelsson
  • Alexandre Del Vecchio
  • Yamen Sader
  • Max Maxwell
  • Ivar Vong
  • simone
  • Damir Vandic
  • Adam Wyłuda
  • Kuma Taro
  • Patrick Wheeler
  • NicoVIII
  • MzRyuKa
  • Tudor Luca
  • Guillaume Heu
  • Anthony Scotti
  • Iain H
  • Rodrigo Álvarez
  • Savva
  • Adrian Mouat
  • Chris Vincent
  • Nick Leslie
  • Sigma
  • Guilherme de Maio
  • Dylan Anthony
  • Chew Choon Keat
  • David Pendray
  • Redmar Kerkhoff
  • Jake Wood
  • rebecca
  • Jimpjorps™
  • Rintaro Okamura
  • Antonio Farinetti
  • inoas
  • Dave Lucia
  • Aaron Gunderson
  • Shawn Drape
  • Nikolai Steen Kjosnes
  • Mark Holmes
  • Clifford Anderson
  • Jachin Rupe
  • Rico Leuthold
  • Coder
  • Zsolt Kreisz
  • evanasse
  • optizio
  • Tristan Sloughter
  • Raúl Chouza
  • albertchae
  • ginkogruen
  • Alex Manning
  • Comet
  • Azure Flash
  • Antharuu
  • Dan Gieschen Knutson
  • Erik Terpstra
  • Filip Figiel
  • Benjamin Moss
  • Geir Arne Hjelle
  • Robert Attard
  • Julian Hirn
  • Jonas Hedman Engström
  • Leon Qadirie
  • Francis Hamel
  • Andrew Varner
  • Jerred Shepherd
  • Éber Freitas Dias
  • Wilson Silva
  • Charlie Govea
  • Niket Shah
  • Ernesto Malave
  • Daniele
  • Noah Betzen
  • Michael Jones
  • Mark Dodwell
  • Rotabull
  • Harry Bairstow
  • renatillas
  • OldhamMade
  • Rupus Reinefjord
  • Sakari Bergen
  • Thomas Coopman
  • Jan Pieper
  • Jonas E. P
  • Nomio
  • metame
  • fruno
  • frankwang
  • Jan Skriver Sørensen
  • Pete Jodo
  • Kevin Schweikert
  • iskrisis
  • Kero van Gelder
  • ollie
  • Christopher De Vries
  • Ben Marx
  • Barry Moore II
  • Ruslan Ustitc
  • Michal Timko
  • Andy Young
  • Nikolas
  • bucsi
  • Mark Rudolph
  • n8n - Workflow Automation
  • Shane Poppleton
  • dagi3d
  • Tristan de Cacqueray
  • Samu
  • shxdow
  • Lee Jarvis
  • ZWubs
  • Tomasz Kowal
  • Fede Esteban
  • Eric Koslow
  • Rasmus
  • Robert Ellen
  • Gavin Panella
  • Olaf Sebelin
  • Abel Jimenez
  • Chad Selph
  • Comamoca
  • Yasuo Higano
  • Michael Mazurczak
  • Nigel Baillie
  • Henrik Tudborg
  • Adam Daniels
  • ErikML

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.