Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions frameworks/gleam-mist/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ghcr.io/gleam-lang/gleam:v1.14.0-erlang-alpine AS build
RUN apk add --no-cache gcc musl-dev sqlite-dev
WORKDIR /app
COPY gleam.toml .
RUN gleam deps download
COPY src ./src
RUN gleam export erlang-shipment

FROM erlang:28-alpine
RUN apk add --no-cache sqlite-libs
WORKDIR /app
COPY --from=build /app/build/erlang-shipment /app
EXPOSE 8080
CMD ["/app/entrypoint.sh", "run"]
21 changes: 21 additions & 0 deletions frameworks/gleam-mist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Gleam + Mist β€” BEAM VM HTTP Server

[Mist](https://github.com/rawhat/mist) is a glistening HTTP server for the [Gleam](https://gleam.run/) programming language, running on the BEAM (Erlang VM).

## Why it's interesting

- **First Gleam framework** in HttpArena
- **First BEAM VM entry** β€” adds a completely new runtime to the mix
- Gleam compiles to Erlang bytecode and runs on the battle-tested BEAM VM
- Mist uses OTP processes for concurrency β€” one lightweight process per connection
- The BEAM's preemptive scheduling and per-process GC is a fundamentally different concurrency model than async/await or OS threads
- Type-safe, functional language with exhaustive pattern matching

## Stack

- **Language:** Gleam
- **Runtime:** BEAM (Erlang VM / OTP)
- **HTTP server:** Mist
- **JSON:** gleam_json
- **SQLite:** sqlight (NIF bindings)
- **Compression:** Erlang's built-in zlib
14 changes: 14 additions & 0 deletions frameworks/gleam-mist/gleam.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name = "httparena_gleam_mist"
version = "1.0.0"
target = "erlang"

[dependencies]
gleam_stdlib = ">= 0.70.0 and < 1.0.0"
gleam_http = ">= 4.3.0 and < 5.0.0"
gleam_json = ">= 3.1.0 and < 4.0.0"
gleam_erlang = ">= 1.0.0 and < 2.0.0"
mist = ">= 6.0.0 and < 7.0.0"
sqlight = ">= 1.0.3 and < 2.0.0"
simplifile = ">= 2.0.0 and < 3.0.0"
envoy = ">= 1.0.0 and < 2.0.0"
logging = ">= 1.2.0 and < 2.0.0"
19 changes: 19 additions & 0 deletions frameworks/gleam-mist/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"display_name": "gleam-mist",
"language": "Gleam",
"type": "framework",
"engine": "BEAM (Erlang VM)",
"description": "Mist HTTP server for Gleam on the BEAM VM β€” first Gleam and first BEAM entry in HttpArena.",
"repo": "https://github.com/rawhat/mist",
"enabled": true,
"tests": [
"baseline",
"noisy",
"pipelined",
"limited-conn",
"json",
"upload",
"compression",
"mixed"
]
}
Loading
Loading