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() -> Nil {
  // Run loads of green threads, no problem
  list.range(0, 200_000)
  |> list.each(spawn_greeter)
}

fn spawn_greeter(i: Int) {
  process.spawn(fn() {
    let n = int.to_string(i)
    io.println("Hello from " <> n)
  })
}

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)

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

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.