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)

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

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.