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)

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

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.