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)

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

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.