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)

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

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.