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)

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

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.