Datastar SDK for Gerbil
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-27 21:44:16 -07:00
http namespace package as gerbil-datastar 2026-07-27 21:44:16 -07:00
.gitignore initial commit 2026-07-27 18:42:42 -07:00
build.ss initial commit 2026-07-27 18:42:42 -07:00
example.ss namespace package as gerbil-datastar 2026-07-27 21:44:16 -07:00
gerbil.pkg namespace package as gerbil-datastar 2026-07-27 21:44:16 -07:00
http-test.ss namespace package as gerbil-datastar 2026-07-27 21:44:16 -07:00
http.ss port SDK to Gerbil v19 2026-07-27 18:42:42 -07:00
LICENSE initial commit 2026-07-27 18:42:42 -07:00
README.md namespace package as gerbil-datastar 2026-07-27 21:44:16 -07:00

Datastar Gerbil SDK

This package provides a Gerbil SDK for Datastar v1.0.2 on Gerbil v19's embedded :std/net/http/server.

(import :gerbil-datastar/http)

Installation

gerbil pkg install git.cons.io/jay/gerbil-datastar

Development

Install the SSE dependency, then build and test:

gerbil pkg install git.cons.io/jay/gerbil-sse
gerbil build
gerbil test -v 0 ./...

The opt-in official conformance suite requires Go:

gerbil test -v 0 -D datastar-conformance ./http/conformance-test.ss

Long-lived SSE handlers should use a server configured with response-timeout: !NoTimeout. For now, applications should send periodic events or heartbeats because disconnects are discovered by a later write or server shutdown (TODO: fix).

Example

After building the package:

gerbil env gxi ./example.ss

Open http://127.0.0.1:8001/.

License

MIT