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)

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

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.