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)

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

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.