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)

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

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.