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)

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

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.