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)

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

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.