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)

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

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.