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)

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

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.