AtlatestRepositorysigil-tls

sigil-tls / treepackage.sgl

1;;; sigil-tls - TLS/SSL Connections
2;;;
3;;; Provides TLS/SSL connections using mbedTLS:
4;;; - Secure TCP connections (tls-connect, tls-read, tls-write)
5;;; - System CA certificate verification
6;;; - Non-blocking I/O support for async integration
7;;;
8;;; Depends on sigil-crypto which vendors mbedTLS.
9
10(package
11 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: (list
20 ;; Explicit sigil-lib pin: overrides the extraction-era implicit
21 ;; sigil-stdlib/sigil-lib (^0.15 from the retired sigil-lang repo) that
22 ;; the reintegrated monorepo test-runner chain would otherwise derive.
23 ;;
24 ;; Was ^0.17, justified as "sigil-tls's native codegen needs the 0.17
25 ;; runtime headers". Measured 2026-08-24 on host sigil 0.19.2, two
26 ;; isolated trees differing only in these pins: libsigil-tls.a builds
27 ;; BOTH ways (164998 B at ^0.17, 165542 B at ^0.19). sigil-crypto's
28 ;; identical pin was measured the same way with the same result. See
29 ;; 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 to
37 ;; sigil-test-runner 0.17.17, whose core.sgb is bytecode v10, and a 0.19
38 ;; host emits v11: `sigil test` died with "unsupported bytecode version 11
39 ;; (expected 10)" before running anything. At ^0.19: 19/19 pass.
40 dev-dependencies: (list
41 (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 definition
45 ;; Note: mbedTLS headers/libs come from sigil-crypto dependency — the
46 ;; build system auto-injects sigil-crypto's c-include-dirs
47 ;; (vendor/mbedtls/include + vendor/mbedtls) via dep-include-flags.
48 libraries: (list
49 (library
50 name: 'sigil-tls
51 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: (list
56 (task
57 name: 'build
58 description: "Build the sigil-tls native library"
59 steps: (list
60 ;; Compile tls.c
61 ;; Depends on sigil-lib headers and sigil-crypto (mbedTLS headers).
62 ;; Uses the same mbedTLS config as sigil-crypto for consistent
63 ;; builds. mbedTLS include paths are auto-injected by the build
64 ;; system from sigil-crypto's exposed c-include-dirs.
65 (compile-c-sources
66 sources: '("native/tls.c")
67 flags: (with-sigil-c-flags
68 '("-std=c99"
69 "-Wall" "-Wextra"
70 "-Wno-unused-parameter"
71 "-D_GNU_SOURCE"
72 "-DMBEDTLS_CONFIG_FILE=\"sigil_mbedtls_config.h\"")))
74 ;; Create static library
75 (create-static-library
76 name: "sigil-tls")
78 ;; Compile Scheme module
79 (compile-sigil-modules
80 sources: "src/**/*.sgl")))))