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)

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

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.