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)

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

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.