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)

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

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.