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)

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

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.