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)

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

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.