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)

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

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.