Skip to content

feat(semantic-emoji-filter): SIMD128 sidecar, bundled emoji font and the shipped calibration on the web - #43

Merged
michalharakal merged 1 commit into
developfrom
feature/sef-wasm-simd
Oct 17, 2026
Merged

michalharakal merged 1 commit into
developfrom
feature/sef-wasm-simd

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Three things the web build of SemanticEmojiFilter got wrong, found while running it from another machine on the LAN, plus the version label.

SIMD128 sidecar

shared/wasmJsMain now depends on skainet-backend-wasm-simd (engine 0.61.0). installPlatformKernels() loads the sidecar before the first execution context — the pthreads build when the page is cross-origin isolated (the coi-serviceworker shim provides that on the examples site), the single-threaded build otherwise — and the diagnostics tier label reads the real mode: Wasm SIMD128 (threads), Wasm SIMD128 (single thread), or Wasm (scalar) only when the sidecar failed to load. Until now the label was a hard-coded "Wasm (scalar)" and the sidecar was not on the classpath at all. Linking the sidecar library needs the engine's Kotlin, so the catalog moves to 2.4.20 (with 2.4.10 the Kotlin/Wasm linker fails on wasmMemoryInternal). WasmKernelTierTest (:shared:wasmJsBrowserTest) checks the install and the label.

Emoji glyphs

Skiko has no system fonts in a browser, so every catalog emoji rendered as a replacement box. The web build now bundles a subset of Noto Color Emoji (OFL-1.1, 356 KB, COLRv1 glyphs; THIRD_PARTY_LICENSES/OFL-1.1-NotoColorEmoji.txt, NOTICE entry) cut down to the catalog's 208 emoji by scripts/subset-emoji-font.sh, loaded as a Compose resource and provided to the grid through LocalEmojiFontFamily; desktop and Android keep the system default.

Calibration

The web entry point passed Calibration.DEFAULT (k 14, x0 0.45) while desktop and Android load the shipped catalog/calibration.json (k 22.1, x0 0.279, threshold 0.8). On the web no item ever reached the top tier and "healthy things to eat" showed bacon at 18 %. It now loads the same file; the query yields the twelve items the README describes (🥬 🥗 🥓 🥜 🍎 🍩 🥒 🥕 🍅 🍣 🍌 🍊 above 80 %).

Version label

SKAINET_VERSION is generated from the version catalog at build time (generateBuildInfo in composeApp/build.gradle.kts, also used by the Android app instead of BuildConfig); the hand-written constant still said 0.59.0.

Verification (local)

  • :shared:jvmTest :shared:testAndroidHostTest :cli:compileKotlin :androidApp:assembleDebug :shared:compileKotlinWasmJs :composeApp:compileKotlinWasmJs and -PlayaVerifier=true :verifier:jvmTest :cli:compileKotlin :composeApp:compileKotlinJvm: green.
  • :shared:wasmJsBrowserTest (Chromium): 8 tests green, sidecar simd128-st under Karma.
  • wasmJsBrowserDistribution served over http and driven in headless Chromium: event=kernels | tier=Wasm SIMD128 (threads) | mode=simd128-mt, model ready in ~3 s, color emoji rendered, top tier populated, subtitle "SKaiNET 0.61.0".

…pped calibration on the web

- shared/wasmJsMain depends on skainet-backend-wasm-simd; installPlatformKernels() loads the
  sidecar before the first execution context (pthreads build when the page is cross-origin
  isolated) and the diagnostics tier label reads the real mode instead of a hard-coded
  "Wasm (scalar)". Linking the sidecar library needs the engine's Kotlin, 2.4.20.
- The web build bundles a Noto Color Emoji subset (OFL-1.1, 356 KB, regenerated by
  scripts/subset-emoji-font.sh): Skiko has no system emoji font in a browser, so every
  catalog emoji rendered as a replacement box.
- The web build loads catalog/calibration.json like desktop and Android instead of
  Calibration.DEFAULT, so the calibrated top tier exists on the web too.
- SKAINET_VERSION is generated from the version catalog at build time; the hand-written
  constant still said 0.59.0.
- WasmKernelTierTest (wasmJsBrowserTest) checks the sidecar installs and the label says so.
@michalharakal
michalharakal merged commit acc7699 into develop Oct 17, 2026
1 check passed
@michalharakal
michalharakal deleted the feature/sef-wasm-simd branch October 17, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant