fs-skia-elmish
Drive a generated FS.Skia.UI product through the pure Elmish adapter.
- License 许可
- MIT
- 最近更新
- 2026-06-16
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- fs-skia-elmish
- description
- Drive a generated FS.Skia.UI product through the pure Elmish adapter.
03 SKILL.md 正文
Elmish Capability
Scope
Use this skill for the Elmish boundary of a generated product: wrapping your pure
user model/messages in the adapter so viewer messages and effects are threaded
through one pure update.
Public Contract
The signatures you consume are bundled with this product at
docs/api-surface/Elmish/Elmish.fsi. ElmishAdapter.init and
ElmishAdapter.update are pure: they return the next model and a list of
requested effects as plain values, interpreted later at the host boundary.
Usage
open FS.Skia.UI.Scene
open FS.Skia.UI.Elmish
// init wraps your user model and returns startup effects (values, not I/O).
let adapterModel, startupEffects =
ElmishAdapter.init viewerOptions initialModel (view initialModel)
// update stays pure: next adapter model + requested effects.
let nextModel, effects =
ElmishAdapter.update view (UserMsg productMsg) adapterModel
Build Commands
Run ./fake.sh build -t Dev then ./fake.sh build -t Verify in this product.
Test Commands
Run ./fake.sh build -t Test to assert adapter transitions and effects.
Evidence
Record transition and effect evidence under this product's readiness/ paths. Do
not copy framework readiness reports into the product.
Package Boundary
Keep Model, Msg, Effect, init, and update pure. Native viewer I/O
belongs to fs-skia-skiaviewer interpreter code, not the adapter.
Generated Product
Products that select Elmish also receive Scene and SkiaViewer; wire the adapter
between your pure update and Viewer.runApp.
Persistent problems
When a problem outlasts reasonable in-repo attempts, extensive external research is
mandatory — consult official online docs first (the F#/.NET docs and the driven
library's own documentation/API reference), then community sources (forums, Reddit, Q&A
sites, issue trackers and changelogs). Record the findings and resolving links in the
feature's specs/<feature>/feedback/ folder and, for durable lessons, in this skill's
Sources line. Offline, the mandate degrades to recording "research blocked — <why>"
rather than hard-failing the phase.
Related
- [[fs-skia-skiaviewer]] — interpret the adapter's requested effects at the host.
- [[fs-skia-scene]] — produce the
SceneNodeyourviewreturns.
Sources / links
- Fable.Elmish (driven adapter model): https://elmish.github.io/elmish/
- F#/.NET docs: https://learn.microsoft.com/en-us/dotnet/fsharp/
04 同仓库更多 Skills
fs-skia-ui-widgets
Generated product guidance for Skia-rendered FS.Skia.UI Controls, rich text, chart controls, graph controls, DataGrid, and custom wrappers.
fs-skia-testing
Assert generated-product expectations and evidence in a governed FS.Skia.UI product.
fs-skia-skiaviewer
Wire a generated FS.Skia.UI product to the desktop viewer host.
fs-skia-scene
Build pure scene descriptions in a generated FS.Skia.UI product.
fs-skia-keyboard-input
Map keyboard input to product commands in a generated FS.Skia.UI product.
fs-skia-samples
Work on optional generated product sample-pack content.