Commit9e7983aeRecorded25 Apr 2026Repositorysigil-socket

Extract sigil-socket from sigil monorepo as standalone repo

Message

Scaffolding for the standalone single-package repo:

- package.sgl: add explicit version: "0.13.1"; rewrite url: to https://codeberg.org/sigil/sigil-socket. Single dep on sigil-stdlib via codeberg:sigil/sigil-lang is unchanged. - README.md: package overview + usage + build/test instructions. - .gitignore: build/ + .sigil/ (machine-specific symlinks). - manifest.scm: pure-Scheme guix-shell environment. - dev-redirects.sgl: redirect codeberg:sigil/sigil-lang to a sibling checkout for local pre-publish development. - sigil.lock: auto-generated, pinning sigil-stdlib to v0.13.1 (a436005a) from published codeberg:sigil/sigil-lang.

Self-bootstrap: sigil deps install + sigil test --report green (27/27 passed) against published codeberg:sigil/sigil-lang.

Filter-repo preserved 34 commits from packages/sigil-socket/ in the monorepo.

Reference playbook: procedures/sigil-package-extraction.

Changed
 .gitignore        |  2 ++
 README.md         | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 dev-redirects.sgl |  6 ++++++
 manifest.scm      |  7 +++++++
 package.sgl       |  3 ++-
 sigil.lock        |  9 +++++++++
 6 files changed, 84 insertions(+), 1 deletion(-)
Diff
.gitignoreadded
@@ -0,0 +1,2 @@
+1
build/
+2
.sigil/
README.mdadded
@@ -0,0 +1,58 @@
+1
# sigil-socket
+2
+3
TCP, UDP, and Unix domain socket operations for [Sigil](https://codeberg.org/sigil/sigil).
+4
Provides network socket primitives suitable for both blocking and non-blocking
+5
I/O, including integration with Sigil's coroutine-based async runtime.
+6
+7
This package was extracted from the sigil monorepo — the in-tree history
+8
under `packages/sigil-socket/` is preserved here as `master`.
+9
+10
## Usage
+11
+12
```scheme
+13
(import (sigil socket))
+14
+15
;; TCP client
+16
(let ((sock (tcp-connect "example.com" 80)))
+17
(socket-write-line sock "GET / HTTP/1.0")
+18
(socket-write-line sock "")
+19
(display (socket-read-all sock))
+20
(socket-close sock))
+21
+22
;; TCP server
+23
(let ((server (tcp-listen 8080)))
+24
(let loop ()
+25
(let ((client (tcp-accept server)))
+26
(socket-write-line client "Hello!")
+27
(socket-close client)
+28
(loop))))
+29
+30
;; UDP
+31
(let ((sock (udp-socket)))
+32
(udp-send sock "127.0.0.1" 5000 "Hello")
+33
(socket-close sock))
+34
```
+35
+36
The full export list lives at the top of `src/sigil/socket.sgl`. See
+37
`docs/socket.md` for a usage guide.
+38
+39
## Build & test
+40
+41
This is a pure-Scheme package. No native build step.
+42
+43
```bash
+44
sigil deps install # fetch sigil-stdlib via codeberg:sigil/sigil-lang
+45
sigil test --report # run test/test-socket.sgl
+46
```
+47
+48
For local development against an unpublished sigil-lang, use
+49
`dev-redirects.sgl` (sibling checkout at `../sigil-lang/`):
+50
+51
```bash
+52
sigil deps install --redirects ./dev-redirects.sgl
+53
sigil test --redirects ./dev-redirects.sgl --report
+54
```
+55
+56
## License
+57
+58
BSD-3-Clause. See the monorepo for the canonical license text.
dev-redirects.sgladded
@@ -0,0 +1,6 @@
+1
;; Development redirects — point dependencies at local Sigil checkouts
+2
(redirects
+3
repos: (list
+4
(for-repo
+5
url: "codeberg:sigil/sigil-lang"
+6
use: (from-path dir: "../sigil-lang"))))
manifest.scmadded
@@ -0,0 +1,7 @@
+1
;; sigil-socket development environment
+2
;; Use with: guix shell -m manifest.scm
+3
+4
(specifications->manifest
+5
'("gcc-toolchain"
+6
"make"
+7
"pkg-config"))
package.sglmodified
@@ -4,9 +4,10 @@
4
5
(package
6
name: "sigil-socket"
+7
version: "0.13.1"
8
sigil: "^0.13"
9
description: "TCP/UDP socket operations for Sigil"
9
url: "https://codeberg.org/sigil/sigil"
+10
url: "https://codeberg.org/sigil/sigil-socket"
11
license: "BSD-3-Clause"
12
authors: (list "David Wilson <[email protected]>")
13
sigil.lockadded
@@ -0,0 +1,9 @@
+1
;; Auto-generated by sigil deps install. Do not edit.
+2
(lock
+3
(package name: "sigil-stdlib"
+4
url: "codeberg:sigil/sigil-lang"
+5
ref: "^0.13.1"
+6
sha: "a436005a34754522d3c38b608aa892b4f8e13dd3"
+7
package-selector: "sigil-stdlib"
+8
version: "0.13.1")
+9
)