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)

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

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.