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)

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

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.