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

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.