AtlatestRepositorysigil-tls
1
;;; sigil-tls - TLS/SSL Connections2
;;;3
;;; Provides TLS/SSL connections using mbedTLS:4
;;; - Secure TCP connections (tls-connect, tls-read, tls-write)5
;;; - System CA certificate verification6
;;; - Non-blocking I/O support for async integration7
;;;8
;;; Depends on sigil-crypto which vendors mbedTLS.10
(package11
name: "sigil-tls"12
version: "0.16.7"13
sigil: "0.20"14
description: "TLS/SSL connections for Sigil"15
url: "https://codeberg.org/sigil/sigil-tls"16
license: "BSD-3-Clause"17
authors: (list "David Wilson <[email protected]>")19
dependencies: (list20
;; Explicit sigil-lib pin: overrides the extraction-era implicit21
;; sigil-stdlib/sigil-lib (^0.15 from the retired sigil-lang repo) that22
;; the reintegrated monorepo test-runner chain would otherwise derive.23
;;24
;; Was ^0.17, justified as "sigil-tls's native codegen needs the 0.1725
;; runtime headers". Measured 2026-08-24 on host sigil 0.19.2, two26
;; isolated trees differing only in these pins: libsigil-tls.a builds27
;; BOTH ways (164998 B at ^0.17, 165542 B at ^0.19). sigil-crypto's28
;; identical pin was measured the same way with the same result. See29
;; topics/sigil-crypto-017-pin-does-not-protect-native-codegen.30
(from-git url: "codeberg:sigil/sigil"31
package: "sigil-lib" version: ">=0.21")32
;; Pin the tested TLS 1.3 stack for the upcoming Sigil release.33
(from-git url: "codeberg:sigil/sigil-crypto"34
commit: "71362137db0596e0695791b32c4f6e8faf11b39e"))36
;; These must track the host runtime. At ^0.17 they resolved to37
;; sigil-test-runner 0.17.17, whose core.sgb is bytecode v10, and a 0.1938
;; host emits v11: `sigil test` died with "unsupported bytecode version 1139
;; (expected 10)" before running anything. At ^0.19: 19/19 pass.40
dev-dependencies: (list41
(from-git url: "codeberg:sigil/sigil" package: "sigil-test" version: ">=0.21")42
(from-git url: "codeberg:sigil/sigil" package: "sigil-test-runner" version: ">=0.21"))44
;; Native library definition45
;; Note: mbedTLS headers/libs come from sigil-crypto dependency — the46
;; build system auto-injects sigil-crypto's c-include-dirs47
;; (vendor/mbedtls/include + vendor/mbedtls) via dep-include-flags.48
libraries: (list49
(library50
name: 'sigil-tls51
c-sources: '("native/tls.c")52
c-flags: '("-DMBEDTLS_CONFIG_FILE=\"sigil_mbedtls_config.h\"")53
native-init: "sigil__init_sigil_tls_module"))55
tasks: (list56
(task57
name: 'build58
description: "Build the sigil-tls native library"59
steps: (list60
;; Compile tls.c61
;; Depends on sigil-lib headers and sigil-crypto (mbedTLS headers).62
;; Uses the same mbedTLS config as sigil-crypto for consistent63
;; builds. mbedTLS include paths are auto-injected by the build64
;; system from sigil-crypto's exposed c-include-dirs.65
(compile-c-sources66
sources: '("native/tls.c")67
flags: (with-sigil-c-flags68
'("-std=c99"69
"-Wall" "-Wextra"70
"-Wno-unused-parameter"71
"-D_GNU_SOURCE"72
"-DMBEDTLS_CONFIG_FILE=\"sigil_mbedtls_config.h\"")))74
;; Create static library75
(create-static-library76
name: "sigil-tls")78
;; Compile Scheme module79
(compile-sigil-modules80
sources: "src/**/*.sgl")))))