From 5ba75e77c2b7769c700261e21ca7ab968e7f1960 Mon Sep 17 00:00:00 2001
From: Jakob L. Kreuze
Date: Sat, 11 Jul 2026 13:45:38 -0400
Subject: Some semblance of documentation
---
.dir-locals.el | 3 +++
.gitignore | 1 +
Makefile | 9 +++++++++
README.md | 39 +++++++++++++++++++++++++++++++++++++++
weeb/fcgi.scm | 6 +++++-
5 files changed, 57 insertions(+), 1 deletion(-)
create mode 100644 .dir-locals.el
create mode 100644 .gitignore
create mode 100644 Makefile
create mode 100644 README.md
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..a8a6a6a
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,3 @@
+((scheme-mode
+ (eval . (progn
+ (put 'with-accessors 'scheme-indent-function 1)))))
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6ec2c2b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+weeb/*.so
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..08ba61e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+CC=gcc
+LDLIBS=-lfcgi
+
+LIBS_REQUIRED=guile-3.0
+CFLAGS+=$(shell pkg-config --cflags $(LIBS_REQUIRED))
+LDLIBS+=$(shell pkg-config --libs $(LIBS_REQUIRED))
+
+weeb/gfcgi.so: src/fcgi.c
+ $(CC) $(CFLAGS) -fPIC -shared -o weeb/gfcgi.so $(LDLIBS) src/fcgi.c
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..025b2aa
--- /dev/null
+++ b/README.md
@@ -0,0 +1,39 @@
+# weeb
+
+weeb is a web microframework for GNU Guile built on [FastCGI](FastCGI).
+It aims to provide a comprehensive library for building dynamic websites
+in Scheme, while being leaner, faster, and more stable than Guile's
+`(web server)` module, and integrating well with common web servers like
+[Apache](https://en.wikipedia.org/wiki/Apache_HTTP_Server) and
+[nginx](https://en.wikipedia.org/wiki/Nginx).
+
+API is subject to change.
+
+## Requirements
+
+- GNU Guile 3.0 or later with `--enable-regex`
+- `libfcgi-2.4.1`
+- A web server with FCGI proxy support
+
+## Building
+
+There is one small wrapper library for `libfcgi` that needs to be built.
+Just run `make`.
+
+## Using
+
+```sh
+$ spawn-fcgi -s /tmp/guile-fcgi.sock -- ...
+```
+
+Where `...` is however you would invoke Guile to run your program.
+
+### Apache Vhost
+
+```xml
+
+ ServerName mysite.local
+ ProxyPassMatch ^/ unix:/tmp/guile-fcgi.sock|fcgi://localhost/
+
+
+```
diff --git a/weeb/fcgi.scm b/weeb/fcgi.scm
index 8d28edf..1c3f823 100644
--- a/weeb/fcgi.scm
+++ b/weeb/fcgi.scm
@@ -17,8 +17,12 @@
;;; License along with Weeb. If not, see .
(define-module (weeb fcgi)
+ #:use-module (ice-9 ftw)
#:export (fcgi-accept
fcgi-display
fcgi-read))
-(load-extension "./gfcgi" "init_libfcgi")
+(eval-when (load)
+ (let* ((here (current-filename))
+ (dir (dirname here)))
+ (load-extension (string-append dir "/gfcgi") "init_libfcgi")))
--
cgit v1.3