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)

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

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.