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)

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

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.