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)

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

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.