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 spawn_many() -> List(Pid) {
  // Run loads of green threads, no problem
  int.range(from: 0, to: 200_000, with: Nil, run: fn(_, i) {
    spawn_greeter(i)
  })
}

fn spawn_greeter(i: Int) -> Nil {
  process.spawn(fn() {
    let n = int.to_string(i)
    io.println("Hello from " <> n)
  })
  Nil
}

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)

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

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.