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)

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

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.