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)

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

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.