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)

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

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.