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)

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

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.