Extract sigil-tls from sigil monorepo
Extracted at monorepo f917ee87 (which includes the sigil-crypto extraction rewire) via git filter-repo. Preserves 18 prior commits touching packages/sigil-tls/ plus the relevant merges.
Scaffolding: - README.md: API table + build/test instructions - .gitignore: build/ + .sigil/ - manifest.scm: minimal gcc-toolchain / make / pkg-config - dev-redirects.sgl: redirects codeberg:sigil/sigil AND codeberg:sigil/sigil-crypto to local sibling checkouts
package.sgl changes: - Added version: "0.13.1" - url: swapped to codeberg:sigil/sigil-tls - sigil-stdlib: from-workspace -> from-git codeberg:sigil/sigil package: sigil-stdlib version: "^0.13.1" - sigil-crypto: already from-git, unchanged - Dropped ../sigil-lib/include and ../sigil-lib/src include-dirs from the tls.c compile step; wrapped flags: in (with-sigil-c-flags ...) so sigil-lib's include/ + src/ paths auto-inject (see topics/sigil-with-sigil-c-flags).
No functional changes to src/sigil/tls.sgl or native/tls.c.
See procedures/sigil-package-extraction for the playbook.
.gitignore | 2 ++
README.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dev-redirects.sgl | 10 ++++++++++
manifest.scm | 11 +++++++++++
package.sgl | 18 +++++++++---------
sigil.lock | 13 +++++++++++++
6 files changed, 108 insertions(+), 9 deletions(-).gitignoreadded
build/.sigil/README.mdadded
# sigil-tlsTLS/SSL client connections for [Sigil](https://codeberg.org/sigil/sigil).Secure TCP connections using mbedTLS. Supports TLS 1.2 client connectionswith system CA certificate verification, non-blocking I/O, and STARTTLSupgrades of existing sockets.## Modules| Module | Purpose ||----------------|-----------------------------------------|| `(sigil tls)` | TLS 1.2 client connections |## API summary| Procedure | Purpose ||---------------------------|--------------------------------------------------------|| `tls-connect` | Open a TLS connection to a host/port || `tls-upgrade` | Upgrade an existing TCP socket to TLS (STARTTLS) || `tls-read` | Read a string from a TLS connection || `tls-read-bytevector` | Read raw bytes from a TLS connection || `tls-write` | Write a string or bytevector to a TLS connection || `tls-close` | Close a TLS connection || `tls-closed?` | Whether a connection is closed || `tls-connection?` | Whether a value is a TLS connection || `tls-set-non-blocking!` | Toggle non-blocking mode on the underlying socket |## System prerequisitesNone beyond a working C toolchain. mbedTLS is consumed transitively via[sigil-crypto](https://codeberg.org/sigil/sigil-crypto), which vendorsmbedTLS and exposes its headers to downstream consumers automatically.## Dependencies- sigil-stdlib- sigil-crypto (vendors mbedTLS)## Build```shsigil deps installsigil buildsigil test --report```## Usage```scheme(import (sigil tls))(let ((conn (tls-connect "example.com" 443))) (tls-write conn "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n") (display (tls-read conn)) (tls-close conn))```Set `SIGIL_TLS_INSECURE=1` to skip certificate verification (testing only).## LicenseBSD-3-Clause. See sigil-crypto for the vendored mbedTLS license terms.dev-redirects.sgladded
;; Development redirects — point from-git deps at local sibling checkouts;; during monorepo dev. Use: sigil build --redirects ./dev-redirects.sgl(redirects repos: (list (for-repo url: "codeberg:sigil/sigil" use: (from-path dir: "../sigil")) (for-repo url: "codeberg:sigil/sigil-crypto" use: (from-path dir: "../sigil-crypto"))))manifest.scmadded
;; sigil-tls Development Environment;; Use with: guix shell -m manifest.scm;;;; mbedTLS is vendored inside sigil-crypto (a from-git dependency) and;; compiled in-tree, so no system libmbedtls package is required — only;; a working C toolchain.(specifications->manifest '("gcc-toolchain" "make" "pkg-config"))package.sglmodified
(package name: "sigil-tls" version: "0.13.1" description: "TLS/SSL connections for Sigil" url: "https://codeberg.org/sigil/sigil" url: "https://codeberg.org/sigil/sigil-tls" license: "BSD-3-Clause" authors: (list "David Wilson <[email protected]>") dependencies: (list (from-workspace name: "sigil-stdlib") (from-git url: "codeberg:sigil/sigil" package: "sigil-stdlib" version: "^0.13.1") (from-git url: "codeberg:sigil/sigil-crypto" version: "^0.13.1")) ;; Native library definition ;; system from sigil-crypto's exposed c-include-dirs. (compile-c-sources sources: '("native/tls.c") include-dirs: '("../sigil-lib/include" "../sigil-lib/src") flags: '("-std=c99" "-Wall" "-Wextra" "-Wno-unused-parameter" "-D_GNU_SOURCE" "-DMBEDTLS_CONFIG_FILE=\"sigil_mbedtls_config.h\"")) flags: (with-sigil-c-flags '("-std=c99" "-Wall" "-Wextra" "-Wno-unused-parameter" "-D_GNU_SOURCE" "-DMBEDTLS_CONFIG_FILE=\"sigil_mbedtls_config.h\""))) ;; Create static library (create-static-librarysigil.lockadded
;; Auto-generated by sigil deps install. Do not edit.(lock (package name: "sigil-stdlib" url: "codeberg:sigil/sigil" ref: "^0.13.1" sha: "1aea1cecd3487bf07d071da2c1e7eb3cf4bbdb21" package-selector: "sigil-stdlib") (package name: "sigil-crypto" url: "codeberg:sigil/sigil-crypto" ref: "^0.13.1" sha: "e5a2cede45cc6130d91d251b6f818c91954b1fe5" version: "0.13.1"))