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)

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

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.