AtlatestRepositorysigil-vt
1
;;; sigil-vt — the native VT/ANSI terminal core.2
;;;3
;;; A VT100/xterm-subset terminal emulator in C: an incremental byte stream ->4
;;; a damage-tracked int32[4]-per-cell grid, with scrollback, cursor-report /5
;;; device-attribute replies, an out-of-band event queue (title / bell /6
;;; OSC-52 clipboard), mouse-mode flags, and native style-merged ROW-RUN7
;;; extraction (the render seam). It is the native reimplementation of slate's8
;;; (slate term) emulator — the Sigil emulator is the spec; this reproduces its9
;;; semantics cell-for-cell (test/vt-test.sgl is the ported conformance suite).10
;;;11
;;; NO vt-diff (the grid-diff ANSI emitter) — deferred to M3 (sigil-tui revival).13
(package14
name: "sigil-vt"15
version: "0.1.1"16
sigil: "^0.17"17
description: "Native VT/ANSI terminal core: parser + int32[4] grid + damage/scrollback/replies/events + row-runs"18
url: "https://codeberg.org/sigil/sigil-vt"19
license: "BSD-3-Clause"20
authors: (list "David Wilson <[email protected]>")22
dependencies: (list)24
;; Native test harness needs sigil-test + sigil-test-runner (resolved to the25
;; local monorepo via dev-redirects.sgl during development).26
dev-dependencies: (list27
(from-git url: "codeberg:sigil/sigil" package: "sigil-test" version: "^0.17")28
(from-git url: "codeberg:sigil/sigil" package: "sigil-test-runner" version: "^0.17")29
;; sigil-build (pulled transitively by the test-runner to build the native30
;; harness) imports (sigil version) from the separate sigil-version repo.31
(from-git url: "codeberg:sigil/sigil-version" package: "sigil-version" version: "^0.16"))33
;; Native library: the C core + its native-init hook (collected into CLI/test34
;; entrypoints so %vt-* builtins register at VM startup).35
libraries: (list36
(library37
name: 'sigil-vt38
c-sources: '("native/vt.c")39
native-init: "sigil__init_sigil_vt_module"))41
;; Declare a wasm-bridge so a consuming wasm app (Slate) whole-archives42
;; libsigil-vt.a — that pulls the strong `sigil_wasm_vt_register` export43
;; (native/vt.c) in to satisfy the runtime's weak hook (added in monorepo44
;; 0.17.16, the t-4c70 rider), which registers the %vt-* natives. COMPUTE-ONLY:45
;; no JS asset and no wasm imports (the parser is pure computation), so there46
;; is no `js` — the bridge loader emits `"js":""` and skips the script load.47
provides: (list48
wasm-bridge: '((name . vt)49
(imports . ((sigil vt)))))51
tasks: (list52
(task53
name: 'build54
description: "Build the sigil-vt native library"55
steps: (list56
(compile-c-sources57
sources: '("native/vt.c")58
flags: (with-sigil-c-flags '("-std=c99"59
"-Wall" "-Wextra"60
"-Wno-unused-parameter"61
"-D_GNU_SOURCE")))62
(create-static-library63
name: "sigil-vt")64
(compile-sigil-modules65
sources: "src/**/*.sgl")))))