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)

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

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.