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)

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

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.