AtlatestRepositorysigil-web-repl

sigil-web-repl / treepackage.sgl

1;;; sigil-web-repl - Interactive Sigil REPL for the web
2;;;
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 for
5;;; interactive input/output.
6
7(package
8 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: (list
18 (config
19 name: 'dev
20 output-dir: "build/dev"
21 debug?: #t
22 optimize: 0)
23 (config
24 name: 'release
25 output-dir: "build/release"
26 debug?: #f
27 optimize: 2)
28 (config
29 name: 'web
30 output-dir: "build/web"
31 toolchain: 'zig
32 target: "wasm32-wasi"
33 debug?: #f
34 optimize: 2
35 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: (list
46 (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: (list
52 (task
53 name: 'build
54 description: "Build the web REPL application"
55 steps: (list
56 ;; Compile Sigil modules
57 (compile-sigil-modules
58 sources: "src/**/*.sgl")
60 ;; Link the web application
61 ;; This creates sigil-web-repl.js and sigil-web-repl.wasm
62 ;; with all modules embedded
63 (link-web-application
64 name: "sigil-web-repl")
66 ;; Copy assets (index.html, etc.) to output directory
67 (copy-assets
68 source-dir: "assets")))))