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)

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

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.