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)

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

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.