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)

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

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.