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)

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

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.