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)

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

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.