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)

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

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.