WASM rebuild + playground page
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,21 @@
|
||||
;; Playground — interactive REPL with lazy-loaded compiler
|
||||
;; Playground — demonstrates lazy module loading on navigation
|
||||
|
||||
(defcomp ~playground/content (&key (title "Playground"))
|
||||
(~docs/page :title title
|
||||
(h1 "Playground")
|
||||
(p "An interactive SX REPL. The compiler module loads on demand when you navigate here.")
|
||||
(p "This page lazy-loads the " (code "sx freeze") " and " (code "sx compiler")
|
||||
" modules when you navigate here. They are NOT loaded at boot.")
|
||||
(span :data-sx-island "playground/repl"
|
||||
(div (~tw :tokens "mt-6 border border-stone-200 rounded-lg overflow-hidden")
|
||||
(div (~tw :tokens "bg-stone-100 px-4 py-2 text-sm font-mono text-stone-500")
|
||||
"sx> ")
|
||||
(div (~tw :tokens "p-4 font-mono text-sm min-h-[120px] text-stone-400")
|
||||
"Loading compiler...")))))
|
||||
"Loading modules...")))))
|
||||
|
||||
(defisland ~playground/repl ()
|
||||
(do
|
||||
;; These two modules are NOT in the boot manifest — they load on demand
|
||||
(load-library! "sx freeze")
|
||||
(load-library! "sx compiler")
|
||||
(let ((input (signal ""))
|
||||
(output (signal "(ready)"))
|
||||
|
||||
Reference in New Issue
Block a user