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)

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

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.