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

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.