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)

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

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.