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)

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

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.