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)

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

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.