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)

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

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.