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)

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

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.