Commitf7a49a17Recorded29 Mar 2026Repositorysigil-xmpp

Add README

Changed
 README.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)
Diff
README.mdadded
@@ -0,0 +1,76 @@
+1
# sigil-xmpp
+2
+3
A [Sigil](https://codeberg.org/sigil/sigil) library for XMPP (Jabber) messaging. Provides a full-featured client with STARTTLS, SASL authentication, roster management, presence tracking, and Multi-User Chat (MUC) support.
+4
+5
## Features
+6
+7
- **Connection management** -- STARTTLS upgrade, SASL authentication (SCRAM-SHA-1, PLAIN)
+8
- **JID handling** -- parse and format JIDs, extract user/domain/resource
+9
- **Stanza construction** -- build and inspect messages, presence, and IQ stanzas
+10
- **Roster management** -- fetch, add, remove contacts, handle subscription requests
+11
- **Presence tracking** -- monitor availability by resource, set your own status
+12
- **Multi-User Chat** -- join/leave rooms, occupant tracking, group/private messaging (XEP-0045)
+13
- **Cooperative I/O** -- blocking (`xmpp-run`) or non-blocking (`xmpp-tick`) event loops
+14
+15
## Usage
+16
+17
Add `sigil-xmpp` as a dependency in your `package.sgl`:
+18
+19
```scheme
+20
(from-git url: "codeberg:sigil/sigil-xmpp" package: "sigil-xmpp")
+21
```
+22
+23
Then import and connect:
+24
+25
```scheme
+26
(import (sigil xmpp))
+27
+28
(define conn (make-xmpp-connection
+29
host: "xmpp.example.com"
+31
password: "secret"))
+32
+33
;; Install roster, presence, and MUC handling
+34
(xmpp-install-features conn)
+35
+36
;; Set up message handler
+37
(xmpp-on conn 'message
+38
(lambda (stanza)
+39
(display (stanza-body stanza))))
+40
+41
;; Connect and run
+42
(xmpp-connect conn)
+43
(xmpp-set-status conn "Online")
+44
(xmpp-run conn)
+45
```
+46
+47
## Modules
+48
+49
| Module | Description |
+50
|--------|-------------|
+51
| `(sigil xmpp)` | Top-level re-exports |
+52
| `(sigil xmpp stanza)` | JID parsing, stanza construction and inspection |
+53
| `(sigil xmpp sasl)` | SASL authentication (SCRAM-SHA-1, PLAIN) |
+54
| `(sigil xmpp connection)` | Connection lifecycle, event handling, I/O loop |
+55
| `(sigil xmpp roster)` | Roster management and subscription handling |
+56
| `(sigil xmpp presence)` | Presence tracking by resource |
+57
| `(sigil xmpp muc)` | Multi-User Chat rooms and occupant tracking |
+58
+59
## Dependencies
+60
+61
- sigil-stdlib
+62
- sigil-socket
+63
- sigil-tls
+64
- sigil-crypto
+65
- sigil-sxml
+66
+67
## Building
+68
+69
```bash
+70
sigil build --redirects dev-redirects.sgl
+71
sigil test
+72
```
+73
+74
## License
+75
+76
BSD-3-Clause