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)

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

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.