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)

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

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.