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)

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

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.