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)

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

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.