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)

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

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.