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)

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

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.