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)

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

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.