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)

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

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.