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)

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

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.