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)

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

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.