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)

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

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.