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() {
  // Run loads of green threads, no problem
  list.range(0, 200_000)
  |> list.each(fn(i) {
    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)

  • Dylan Anthony
  • Scott Trinh
  • metame
  • Ripta Pasay
  • John Strunk
  • Charlie Duong
  • Kero van Gelder
  • Rupus Reinefjord
  • Corentin J.
  • Jerred Shepherd
  • Hannes Schnaitter
  • lidashuang
  • André Mazoni
  • Ajit Krishna
  • Anthony Maxwell
  • sambit
  • Vassiliy Kuzenkov
  • Tim Brown
  • Martin Rechsteiner
  • ggobbe
  • Henning Dahlheim
  • Evan Johnson
  • Andrew Varner
  • Carlos Saltos
  • Race Williams
  • Michael Mazurczak
  • Peter Rice
  • MoeDev
  • MzRyuKa
  • Cam Ray
  • Diemo Gebhardt
  • Georgi Martsenkov
  • Anthony Khong
  • Rotabull
  • Christopher Keele
  • gamachexx
  • Michael Duffy
  • Mike Roach
  • Adrian Mouat
  • Robert Attard
  • Ian M. Jones
  • Alex Viscreanu
  • jooaf
  • bgw
  • Luke Amdor
  • Rasmus
  • Matt Mullenweg
  • Victor Rodrigues
  • Jakob Ladegaard Møller
  • Michael McClintock
  • Weizheng Liu
  • Edon Gashi
  • Leandro Ostera
  • Nick Chapman
  • Chew Choon Keat
  • Martin Janiczek
  • Scott Wey
  • takasehideki
  • Dan
  • Sean Roberts
  • Dennis Dang
  • Arthur Weagel
  • Brett Kolodny
  • Ben
  • Luna
  • Ed Hinrichsen
  • Hans Raaf
  • Ethan Olpin
  • Nick Reynolds
  • Benjamin Moss
  • Sean Jensen-Grey
  • Azure Flash
  • Hammad Javed
  • Nikolai Steen Kjosnes
  • Alex Houseago
  • Sławomir Ehlert
  • Redmar Kerkhoff
  • Jojor
  • Seve Salazar
  • METATEXX GmbH
  • Jan Skriver Sørensen
  • Igor Montagner
  • Joseph Lozano
  • Arya Irani
  • Savva
  • David Bernheisel
  • Ernesto Malave
  • bucsi
  • Thomas
  • Isaac
  • Guillaume Hivert
  • Danielle Maywood
  • Joey Kilpatrick
  • Lukas Bjarre
  • Vic Valenzuela
  • re.natillas
  • NFIBrokerage
  • Kemp Brinson
  • Joey Trapp
  • ZWubs
  • Sebastian Porto
  • Mikael Karlsson
  • Eric Koslow
  • Kramer Hampton
  • Jon Lambert
  • Lennon Day-Reynolds
  • Sammy Isseyegh
  • Ian González
  • erlend-axelsson
  • Grant Everett
  • Stefan Hagen
  • martonkaufmann
  • Filip Figiel
  • Aaron Gunderson
  • James MacAulay
  • Walton Hoops
  • Jake Wood
  • Leah Ulmschneider
  • Michael Jones
  • Julian Hirn
  • Emma
  • Xucong Zhan
  • Éber Freitas Dias
  • Adam Brodzinski
  • Giovanni Kock Bonetti
  • Raúl Chouza
  • David Cornu
  • Joshua Steele
  • Rodrigo Álvarez
  • Antharuu
  • Matt Robinson
  • Philpax
  • Adi Iyengar
  • Henry Warren
  • Kritsada Sunthornwutthikrai
  • Bruno Michel
  • Patrick Wheeler
  • KamilaP
  • Jan Pieper
  • Olaf Sebelin
  • Leonardo Donelli
  • István Bozsó
  • Jonas E. P
  • Tristan Sloughter
  • Dan Dresselhaus
  • Chris Ohk
  • tommaisey
  • Martin Poelstra
  • Guilherme de Maio
  • Bruce Williams
  • Chris King
  • Brad Mehder
  • Oliver Tosky
  • Cole Lawrence
  • Mark Markaryan
  • Charlie Govea
  • Daniel S Jeremiah
  • OldhamMade
  • Scott Zhu Reeves
  • Kevin Schweikert
  • Benjamin Kane
  • Metin Emiroğlu
  • evanasse
  • Gavin Panella
  • Fabrizio Damicelli
  • Jacob Lamb
  • Isaac Harris-Holt
  • Isaac McQueen
  • Georg Hartmann
  • Krzysztof Gasienica-Bednarz
  • Tudor Luca
  • Jean-Luc Geering
  • Viv Verner
  • marcusandre
  • G-J van Rooyen
  • Chris Donnelly
  • Henrik Tudborg
  • Lily Rose
  • Sam Zanca
  • Matt Champagne
  • Cameron Presley
  • tymak
  • Ivar Vong
  • Erik Terpstra
  • Bjoern Paschen
  • Strandinator
  • Oliver Medhurst
  • Matt Savoia
  • Brett Cannon
  • Richard Viney
  • Alexandre Del Vecchio
  • inoas
  • Ameen Radwan
  • ollie
  • Christopher David Shirk
  • Mark Dodwell
  • NicoVIII
  • Robert Malko
  • Brian Glusman
  • Danny Martini
  • ErikML
  • Heyang Zhou
  • Coder
  • Sigma
  • Shane Poppleton
  • Ben Marx
  • Fede Esteban
  • Max McDonnell
  • Renovator
  • Rintaro Okamura
  • Geir Arne Hjelle
  • optizio
  • Nomio
  • Chris Rybicki
  • Nicklas Sindlev Andersen
  • Rico Leuthold
  • Carlo Munguia
  • Tom Schuster
  • Wilson Silva
  • Leon Qadirie
  • Endo Shogo
  • Tristan de Cacqueray
  • Matthew Whitworth
  • Matt Van Horn
  • John Pavlick
  • Florian Kraft
  • Alexander Stensrud
  • Adam Johnston
  • Niket Shah
  • Chris Lloyd
  • Jean-Marc QUERE
  • Matt Heise
  • ad-ops
  • Max Bridges
  • dennistruemper
  • Ninaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  • Jean Niklas L'orange
  • Bartek Górny
  • Graham Vasquez
  • Hayleigh Thompson
  • Andrea Bueide
  • Thomas Coopman
  • Willyboar
  • Chad Selph
  • Thomas Ernst
  • yoshi~
  • Ocean
  • n8n - Workflow Automation
  • Christopher Jung
  • eli
  • Gabriel Vincent
  • Jean-Adrien Ducastaing
  • Reilly Tucker Siemens
  • EMR Technical Solutions
  • Stefan
  • Yasuo Higano
  • devinalvaro
  • Robert Ellen
  • Manuel Rubio
  • Fernando Farias
  • Marcos
  • Steinar Eliassen
  • Zsombor Gasparin
  • Clifford Anderson
  • Alembic
  • Anthony Scotti
  • Bjarte Aarmo Lund
  • Volker Rabe
  • Iain H
  • Hannes Nevalainen
  • Eileen Noonan
  • Jimpjorps™
  • Noah Betzen
  • Matthew Jackson
  • CJ Salem
  • Evaldo Bratti
  • Mark Holmes
  • Johan Strand
  • Qdentity
  • Lee Jarvis
  • Daniil Nevdah
  • Hazel Bachrach
  • Pierrot
  • jiangplus
  • Barry Moore
  • Abel Jimenez
  • Jake Cleary
  • Ruslan Ustitc
  • Justin Lubin
  • Ben Myles
  • Giacomo Cavalieri
  • Dan Strong
  • Ben Martin
  • Adam Wyłuda
  • Stephen Belanger
  • Alex Manning
  • Felix
  • Nathaniel Knight
  • Pete Jodo
  • Renato Massaro
  • Jonas Hedman Engström
  • Chris Vincent
  • Constantin (Cleo) Winkler
  • Theo Harris
  • Daigo Shitara
  • Sam Aaron
  • Damir Vandic
  • simone
  • Valerio Viperino
  • Jérôme Schaeffer
  • Hubert Małkowski
  • Mariano Uvalle
  • frankwang
  • John Björk
  • Lexx
  • Colin
  • Julian Schurhammer
  • Natanael Sirqueira
  • Jen Stehlik
  • Yamen Sader
  • Danny Arnold
  • Donnie Flood
  • Sean Cribbs
  • Mat Warger
  • Francis Hamel
  • Tom Hughes
  • Tomasz Kowal
  • AndreHogberg
  • Christopher Dieringer
  • Comet
  • James Birtles
  • Paul Guse
  • Timo Sulg
  • Pedro Correa
  • Guillaume Heu
  • Brian Dawn
  • Aleksei Gurianov
  • Dylan Carlson
  • Comamoca
  • Marius Kalvø
  • Saša Jurić
  • Alexander Koutmos
  • Christopher De Vries
  • nunulk

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.