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

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.