Repository navigation
feat(semantic-emoji-filter): SIMD128 sidecar, bundled emoji font and the shipped calibration on the web - #43
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/wasmJsMainnow depends onskainet-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 (thecoi-serviceworkershim 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 onwasmMemoryInternal).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 byscripts/subset-emoji-font.sh, loaded as a Compose resource and provided to the grid throughLocalEmojiFontFamily; 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 shippedcatalog/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_VERSIONis generated from the version catalog at build time (generateBuildInfoincomposeApp/build.gradle.kts, also used by the Android app instead ofBuildConfig); the hand-written constant still said 0.59.0.Verification (local)
:shared:jvmTest :shared:testAndroidHostTest :cli:compileKotlin :androidApp:assembleDebug :shared:compileKotlinWasmJs :composeApp:compileKotlinWasmJsand-PlayaVerifier=true :verifier:jvmTest :cli:compileKotlin :composeApp:compileKotlinJvm: green.:shared:wasmJsBrowserTest(Chromium): 8 tests green, sidecarsimd128-stunder Karma.wasmJsBrowserDistributionserved 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".