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)

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

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.