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)

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

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.