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)

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

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.