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)

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

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.