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)

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

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.