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)

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

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.