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)

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

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.