AtlatestRepositorysigil-web-repl
sigil-web-repl / treepackage.sgl
1
;;; sigil-web-repl - Interactive Sigil REPL for the web2
;;;3
;;; A web-based REPL and code editor for trying Sigil in the browser.4
;;; Uses sigil-wasm-runtime as the runtime and delimited continuations for5
;;; interactive input/output.7
(package8
name: "sigil-web-repl"9
version: "0.7.0"10
sigil: "^0.15"11
description: "Interactive Sigil web REPL"12
url: "https://codeberg.org/sigil/sigil-web-repl"13
license: "BSD-3-Clause"14
authors: (list "David Wilson <[email protected]>")15
entry: '(sigil web-repl)17
configs: (list18
(config19
name: 'dev20
output-dir: "build/dev"21
debug?: #t22
optimize: 0)23
(config24
name: 'release25
output-dir: "build/release"26
debug?: #f27
optimize: 2)28
(config29
name: 'web30
output-dir: "build/web"31
toolchain: 'zig32
target: "wasm32-wasi"33
debug?: #f34
optimize: 235
c-flags: (with-sigil-c-flags '("-std=c99" "-D_GNU_SOURCE" "-D__SIGIL_WASM__" "-Wall" "-O2"))36
link-flags: '("-Wl,--export=sigil_wasm_init"37
"-Wl,--export=sigil_wasm_start"38
"-Wl,--export=sigil_wasm_eval"39
"-Wl,--export=sigil_wasm_input"40
"-Wl,--export=malloc"41
"-Wl,--export=free"42
"-lc")43
features: '(web wasm)))45
dependencies: (list46
(from-git url: "codeberg:sigil/sigil" package: "sigil-wasm-runtime" version: "^0.9.0")47
(from-git url: "codeberg:sigil/sigil" package: "sigil-stdlib" version: "^0.9.0")48
(from-git url: "codeberg:sigil/sigil-repl" version: "^0.14.1")49
(from-git url: "codeberg:sigil/sigil-ansi" version: "^0.14.0"))51
tasks: (list52
(task53
name: 'build54
description: "Build the web REPL application"55
steps: (list56
;; Compile Sigil modules57
(compile-sigil-modules58
sources: "src/**/*.sgl")60
;; Link the web application61
;; This creates sigil-web-repl.js and sigil-web-repl.wasm62
;; with all modules embedded63
(link-web-application64
name: "sigil-web-repl")66
;; Copy assets (index.html, etc.) to output directory67
(copy-assets68
source-dir: "assets")))))