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)

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

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.