Transpile dom.sx + browser.sx into bundle; add FFI variable aliases

dom-lib and browser-lib were listed in ADAPTER_FILES but never actually
transpiled — their functions only existed as native PLATFORM_*_JS code.
Add them to the build loop so the FFI library wrappers are compiled.
Add hostCall/hostGet/etc. variable aliases for transpiled code, and
console-log to browser.sx for runtime-eval'd SX code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 11:43:42 +00:00
parent bc7da977a0
commit 8e6e7dce43
4 changed files with 434 additions and 2 deletions

View File

@@ -166,6 +166,11 @@
(fn (msg)
(host-call (host-global "console") "warn" (str "[sx] " msg))))
(define console-log
(fn (&rest args)
(host-call (host-global "console") "log"
(join " " (cons "[sx]" (map str args))))))
(define now-ms
(fn ()
(host-call (host-global "Date") "now")))