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)

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

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.