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)

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

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.