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)

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

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.