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() {
  let subject = process.new_subject()

  // Spawn a child green thread
  process.spawn(fn() {
    // Send a message back to the parent
    process.send(subject, "Hello, Joe!")
  })

  // Wait for the message to arrive
  echo process.receive(subject, 100)
}

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)

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

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.