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)

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