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)

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

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.