Native SQLite + an HTTP server over FFI (ring-app foundation)
sqlite.ss: jolt.sqlite + jdbc.core (jolt-lang/db's API) over the system libsqlite3 — open/close, exec, a prepared query returning row maps, text/int/ double parameter binding, last_insert_rowid. The sqlite3 C API is non-variadic so it binds directly. http-server.ss: a minimal HTTP/1.1 server over BSD sockets (socket/bind/listen/ accept/recv/send via FFI), one connection at a time on a background accept thread, synchronous Ring handlers. Parses the request line + headers + a Content-Length body into a Ring request map (:body a StringReader), formats a Ring response map back. Exposed as jolt.http.server and, for the example, as ring-janet.adapter/run-server. macOS and Linux socket-option constants handled.
This commit is contained in:
parent
b251e9166e
commit
5e916433b8
3 changed files with 361 additions and 0 deletions
|
|
@ -21,6 +21,8 @@
|
|||
(load "host/chez/compile-eval.ss")
|
||||
(load "host/chez/png.ss") ; jolt.png — a baked namespace before the snapshot
|
||||
(load "host/chez/http-client.ss") ; jolt.http-client (libcurl)
|
||||
(load "host/chez/sqlite.ss") ; jolt.sqlite + jdbc.core (libsqlite3)
|
||||
(load "host/chez/http-server.ss") ; jolt.http.server + ring-janet.adapter (BSD sockets)
|
||||
(load "host/chez/loader.ss")
|
||||
|
||||
;; jolt.main + jolt.deps live under jolt-core; keep them (and src/jolt) on the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue