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)

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

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.