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)

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

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.