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)

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

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.