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)

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

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.