Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
85ecee4
Add Prologue (Nim) web framework
BennyFranciscus Mar 15, 2026
a197d30
retrigger CI (DNS failure was transient)
BennyFranciscus Mar 15, 2026
a62eb52
fix: add build.sh with --network host for Prologue
BennyFranciscus Mar 15, 2026
80a9958
fix: build.sh default tag when called without arguments
BennyFranciscus Mar 15, 2026
0b507f1
fix(prologue): add sqlite-dev for db_sqlite import
BennyFranciscus Mar 15, 2026
0602fe0
fix: use db_connector/db_sqlite for Nim 2.0 (std/db_sqlite removed fr…
BennyFranciscus Mar 15, 2026
8f7ea1b
Fix zippy import: nimble package, not std lib
BennyFranciscus Mar 15, 2026
6e349b3
fix(prologue): resp macro needs body + status code
BennyFranciscus Mar 15, 2026
da0b2c4
fix: use closure-typed HandlerAsync for middleware in Nim 2.0
BennyFranciscus Mar 15, 2026
bd28279
fix: convert all handlers to closure-typed HandlerAsync for Nim 2.0
BennyFranciscus Mar 15, 2026
dce613a
fix: add {.closure, gcsafe.} pragmas for Nim 2.0 compatibility
BennyFranciscus Mar 15, 2026
57e2280
fix: wrap global access in {.cast(gcsafe).} for Nim 2.0 thread safety
BennyFranciscus Mar 15, 2026
7db6f05
fix: switch to asynchttpserver backend for chunked encoding and metho…
BennyFranciscus Mar 15, 2026
68e2024
fix: decode chunked transfer-encoding + reject invalid HTTP methods
BennyFranciscus Mar 15, 2026
5b59557
fix: use correct Prologue backend flag (-d:usestd) and remove double …
BennyFranciscus Mar 15, 2026
28593f4
fix(prologue): increase maxBody to 32MB for upload benchmark
BennyFranciscus Mar 15, 2026
9c3d823
feat(prologue): add multi-process via SO_REUSEPORT + posix fork
BennyFranciscus Mar 15, 2026
acd46ed
fix(prologue): use posix.signal instead of c_signal, /proc/cpuinfo fo…
BennyFranciscus Mar 15, 2026
838c7e5
fix: use sigaction instead of signal() for Nim 2.0 compatibility
BennyFranciscus Mar 15, 2026
1a3cfc8
fix: set maxBody under prologue settings key for upload benchmark
BennyFranciscus Mar 15, 2026
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
12 changes: 12 additions & 0 deletions frameworks/prologue/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM nimlang/nim:2.0.14-alpine AS build
RUN apk add --no-cache sqlite-dev
WORKDIR /app
COPY src/ ./
RUN nimble install -y prologue zippy db_connector
RUN nim c -d:release -d:danger -d:usestd --opt:speed --threads:on --passL:-lsqlite3 -o:server server.nim

FROM alpine:3.19
RUN apk add --no-cache libgcc sqlite-libs
COPY --from=build /app/server /server
EXPOSE 8080
CMD ["/server"]
20 changes: 20 additions & 0 deletions frameworks/prologue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Prologue (Nim)

[Prologue](https://github.com/planety/prologue) is a powerful and flexible web framework written in Nim. Under the hood it uses [httpbeast](https://github.com/nicholasgasior/httpbeast) (via httpx) β€” a high-performance HTTP server that leverages epoll on Linux with multi-threaded request handling.

## Why Prologue?

- **Nim compiles to C** β€” native performance with a high-level, Python-like syntax
- **httpbeast backend** β€” uses epoll and SO_REUSEPORT for multi-core scaling
- **Zero-overhead routing** β€” trie-based router compiled at build time
- **First Nim framework in HttpArena** β€” brings a new language to the benchmarks

## Build

```bash
nim c -d:release -d:danger --opt:speed --threads:on -o:server server.nim
```

## Endpoints

All standard HttpArena endpoints are implemented: `/pipeline`, `/baseline11`, `/baseline2`, `/json`, `/compression`, `/upload`, `/db`, `/static/{filename}`.
3 changes: 3 additions & 0 deletions frameworks/prologue/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
TAG="${1:-httparena-prologue}"
docker build --network host -t "$TAG" -f "$(dirname "$0")/Dockerfile" "$(dirname "$0")"
19 changes: 19 additions & 0 deletions frameworks/prologue/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"display_name": "prologue",
"language": "Nim",
"type": "framework",
"engine": "asynchttpserver",
"description": "Prologue web framework for Nim β€” compiles to native C with powerful routing and middleware support.",
"repo": "https://github.com/planety/prologue",
"enabled": true,
"tests": [
"baseline",
"pipelined",
"limited-conn",
"json",
"upload",
"compression",
"mixed",
"noisy"
]
}
Loading
Loading