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)

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

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.