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)

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

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.