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)

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

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.