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)

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

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.