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)

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

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.