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)

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

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.