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)

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

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.