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)

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