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)

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

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.