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)

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

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.