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)

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

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.