WASM rebuild + playground page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-04 21:36:44 +00:00
parent 9b060ef8c5
commit f4f8715d06
2 changed files with 7 additions and 4 deletions

View File

@@ -1792,7 +1792,7 @@
blake2_js_for_wasm_create: blake2_js_for_wasm_create};
}
(globalThis))
({"link":[["runtime-0db9b496",0],["prelude-d7e4b000",0],["stdlib-23ce0836",[]],["sx-d3c0ad56",[2]],["jsoo_runtime-f96b44a8",[2]],["js_of_ocaml-651f6707",[2,4]],["dune__exe__Sx_browser-e2e6110d",[2,3,5]],["std_exit-10fb8830",[2]],["start-f5d3f095",0]],"generated":(b=>{var
({"link":[["runtime-0db9b496",0],["prelude-d7e4b000",0],["stdlib-23ce0836",[]],["sx-d4b9c764",[2]],["jsoo_runtime-f96b44a8",[2]],["js_of_ocaml-651f6707",[2,4]],["dune__exe__Sx_browser-ba5b5565",[2,3,5]],["std_exit-10fb8830",[2]],["start-f5d3f095",0]],"generated":(b=>{var
c=b,a=b?.module?.export||b;return{"env":{"caml_ba_kind_of_typed_array":()=>{throw new
Error("caml_ba_kind_of_typed_array not implemented")},"caml_exn_with_js_backtrace":()=>{throw new
Error("caml_exn_with_js_backtrace not implemented")},"caml_int64_create_lo_mi_hi":()=>{throw new

View File

@@ -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)"))