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)

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

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.