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)

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

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.