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)

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

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.