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)

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

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.