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)

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

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.