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)

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

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.