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)

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

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.