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)

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

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.