AtlatestRepositoryblackice

blackice / treepackage.sgl

1;;; blackice - a cyberpunk Sokoban that runs in the browser on the Sigil WASM bridges.
2;;;
3;;; Pure, platform-agnostic game rules (src/blackice/{level,game,levels}.sgl) with
4;;; a thin sigil-wasm-dom renderer (src/blackice/render.sgl) and a generic, app-
5;;; agnostic JS loader (web/sigil-web-app.js) so the app author writes zero JS
6;;; wiring. The entry library (src/blackice/main.sgl) exposes the generic
7;;; `sigil-web-dispatch-event` convention the loader calls on every DOM event.
8;;;
9;;; The `web` config mirrors enclave-pwa/wasm-irc-runtime (the working wasm32-wasi
10;;; reference). Deps point at the LIVE monorepo tree by path (the WASM release is
11;;; HELD pending validation; blackICE is one of its three validators).
13(package
14 name: "blackice"
15 version: "0.1.0"
16 sigil: "^0.16"
17 entry: '(blackice main)
19 configs: (list
20 (config
21 name: 'web
22 output-dir: "build/web"
23 toolchain: 'zig
24 target: "wasm32-wasi"
25 debug?: #f
26 optimize: 2
27 ;; Bundle the lib modules into a single lib.bundle so the browser makes
28 ;; one request instead of ~70 (the generic loader prefers lib.bundle and
29 ;; falls back to the per-file manifest). Big win on cold load.
30 bundle?: #t
31 features: '(web wasm)))
33 dependencies: (list
34 (from-path dir: "../sigil" package: "sigil-lib")
35 (from-path dir: "../sigil" package: "sigil-stdlib")
36 (from-path dir: "../sigil" package: "sigil-wasm-runtime")
37 (from-path dir: "../sigil" package: "sigil-wasm-dom")
38 (from-path dir: "../sigil" package: "sigil-browser")
39 (from-path dir: "../sigil-web" package: "sigil-web"))
41 tasks: (list
42 (task
43 name: 'build
44 description: "Build the blackICE WASM game runtime"
45 steps: (list
46 (compile-sigil-modules sources: "src/**/*.sgl")
47 (link-web-application name: "blackice")))))