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)

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

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.