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)

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

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.