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)

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

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.