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)

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

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.