From a48ad4c748f1ae5fd59fdb0a710382ff43635e21 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 6 Nov 2026 12:47:35 +0000 Subject: [PATCH] feat(skill): Rune Rust-native UI guidance and verified scaffold Add references/rust/rune.md: when the Rune GPU UI framework fits over a JS host or DOM-based Rust framework, git-rev pinning (the crates.io `rune` is an unrelated scripting language), crate shape for desktop and web from one cdylib+rlib crate, page mounting, web-target limits (WebGPU canvas, opt-in WebGL2 fallback, no DOM accessibility mirror), and evidence gates using rune::Runtime view tests, headless snaps/trees/scripts and wasm builds. Add assets/rune-web/: a scaffold built and tested against Rune 781e2b6d87cd5f32d6f4365956fad4baaf24ee50. Route to it from SKILL.md (and its description, for skill discovery), browser-wasm.md and steering; record provenance; release as 0.3.0. Co-Authored-By: jjohare --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 4 +- skills/visioncraft/SKILL.md | 5 +- skills/visioncraft/assets/provenance.json | 30 +++ .../assets/rune-web/Cargo.toml.tmpl | 19 ++ .../visioncraft/assets/rune-web/lib.rs.tmpl | 209 ++++++++++++++++++ .../visioncraft/assets/rune-web/main.rs.tmpl | 5 + skills/visioncraft/assets/rune-web/smoke.json | 5 + .../references/rust/browser-wasm.md | 1 + skills/visioncraft/references/rust/rune.md | 122 ++++++++++ .../visioncraft/references/rust/steering.md | 2 + 12 files changed, 400 insertions(+), 6 deletions(-) create mode 100644 skills/visioncraft/assets/rune-web/Cargo.toml.tmpl create mode 100644 skills/visioncraft/assets/rune-web/lib.rs.tmpl create mode 100644 skills/visioncraft/assets/rune-web/main.rs.tmpl create mode 100644 skills/visioncraft/assets/rune-web/smoke.json create mode 100644 skills/visioncraft/references/rust/rune.md diff --git a/Cargo.lock b/Cargo.lock index ff4705e..3633e57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -921,7 +921,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "visioncraft" -version = "0.2.0" +version = "0.3.0" dependencies = [ "clap", "nix", diff --git a/Cargo.toml b/Cargo.toml index e46c3bc..41c0574 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "visioncraft" -version = "0.2.0" +version = "0.3.0" edition = "2024" rust-version = "1.88" description = "Explicit quality plans, bounded execution receipts and deterministic evidence gates" diff --git a/README.md b/README.md index 5559289..bdba411 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Rust 1.88 or later is required. Native execution currently supports Linux with g the deterministic library remains independent of the operating system. ```sh -cargo install visioncraft --locked --version 0.2.0 +cargo install visioncraft --locked --version 0.3.0 visioncraft --help ``` @@ -40,7 +40,7 @@ For the pure Rust library without CLI/process dependencies: ```toml [dependencies] -visioncraft = { version = "0.2.0", default-features = false } +visioncraft = { version = "0.3.0", default-features = false } ``` For a coding agent, install the complete `skills/visioncraft/` directory from the diff --git a/skills/visioncraft/SKILL.md b/skills/visioncraft/SKILL.md index 2c38db1..d4fc6bf 100644 --- a/skills/visioncraft/SKILL.md +++ b/skills/visioncraft/SKILL.md @@ -1,9 +1,9 @@ --- name: visioncraft -description: Builds features with proportionate tests and evidence, diagnoses persistent bugs, and checks engineering designs and release gates. Use for expectation-driven development, difficult debugging, imported review findings, Rust changes, browser-targeted code (Rust compiled to WebAssembly by default), or a requested quality review. Simple edits and standalone prose changes do not need the full workflow. +description: Builds features with proportionate tests and evidence, diagnoses persistent bugs, and checks engineering designs and release gates. Use for expectation-driven development, difficult debugging, imported review findings, Rust changes, browser-targeted code (Rust compiled to WebAssembly by default), Rust-native desktop and web UI with the Rune GPU framework, or a requested quality review. Simple edits and standalone prose changes do not need the full workflow. license: MIT OR Apache-2.0 metadata: - version: "0.2.0" + version: "0.3.0" category: "engineering-quality" --- @@ -35,6 +35,7 @@ command surface. | Candidate tests, coverage gaps or measured quality tools would help | [Optional Agentic QE](references/agentic-qe.md) | | Rust is being written, reviewed or ported | [Steering](references/rust/steering.md), [review](references/rust/review.md), [port](references/rust/port.md) | | Code will run in a browser | [Browser targets: Rust to WebAssembly](references/rust/browser-wasm.md) | +| The UI itself should be Rust, on desktop and web | [Rune UI](references/rust/rune.md), [Rune scaffold](assets/rune-web/) | | Several participants are actually available | [Logical roles](references/roles.md) | | A concrete project example helps scope the work | [Five worked examples](references/worked-examples.md) | diff --git a/skills/visioncraft/assets/provenance.json b/skills/visioncraft/assets/provenance.json index 3b0e54d..529fa79 100644 --- a/skills/visioncraft/assets/provenance.json +++ b/skills/visioncraft/assets/provenance.json @@ -46,6 +46,30 @@ "treatment": "newly written file-level provenance manifest", "behavioural_sources": [] }, + { + "path": "assets/rune-web/Cargo.toml.tmpl", + "licence": "MIT OR Apache-2.0", + "treatment": "newly written verified scaffold: Rune desktop and web app crate", + "behavioural_sources": [] + }, + { + "path": "assets/rune-web/lib.rs.tmpl", + "licence": "MIT OR Apache-2.0", + "treatment": "newly written verified scaffold: Rune desktop and web app crate", + "behavioural_sources": [] + }, + { + "path": "assets/rune-web/main.rs.tmpl", + "licence": "MIT OR Apache-2.0", + "treatment": "newly written verified scaffold: Rune desktop and web app crate", + "behavioural_sources": [] + }, + { + "path": "assets/rune-web/smoke.json", + "licence": "MIT OR Apache-2.0", + "treatment": "newly written verified scaffold: Rune desktop and web app crate", + "behavioural_sources": [] + }, { "path": "assets/traceability.md", "licence": "MIT OR Apache-2.0", @@ -269,6 +293,12 @@ "sha256": "8803404fbe00f2d6bdaa8c00555a2b37a4ad8f5570157bae94af8c7d5dfec29f" } }, + { + "path": "references/rust/rune.md", + "licence": "MIT OR Apache-2.0", + "treatment": "newly written guidance: Rune Rust-native UI selection, crate shape and evidence", + "behavioural_sources": [] + }, { "path": "references/rust/sources/effective-rust.md", "licence": "MIT", diff --git a/skills/visioncraft/assets/rune-web/Cargo.toml.tmpl b/skills/visioncraft/assets/rune-web/Cargo.toml.tmpl new file mode 100644 index 0000000..7893225 --- /dev/null +++ b/skills/visioncraft/assets/rune-web/Cargo.toml.tmpl @@ -0,0 +1,19 @@ +# Copy to Cargo.toml in a new crate, rename the package, and bump `rev` deliberately. +[package] +name = "rune_web_app" +version = "0.1.0" +edition = "2024" +publish = false + +[lib] +# cdylib for the browser bundle, rlib so native tests and the binary share the code. +crate-type = ["cdylib", "rlib"] + +[dependencies] +# Rune is pre-release and not on crates.io; the registry's `rune` is an unrelated +# scripting language. Pin one revision of its fast-forward-only `dev` branch. +rune = { git = "https://github.com/anomalyco/rune", rev = "781e2b6d87cd5f32d6f4365956fad4baaf24ee50" } + +[target.'cfg(target_arch = "wasm32")'.dependencies] +# Must equal the installed wasm-bindgen CLI; a mismatch fails when the page loads. +wasm-bindgen = "=0.2.129" diff --git a/skills/visioncraft/assets/rune-web/lib.rs.tmpl b/skills/visioncraft/assets/rune-web/lib.rs.tmpl new file mode 100644 index 0000000..f367ab7 --- /dev/null +++ b/skills/visioncraft/assets/rune-web/lib.rs.tmpl @@ -0,0 +1,209 @@ +//! A Rune app that builds for the desktop, headless tooling and the browser from one crate. +//! +//! `core` holds the behaviour and has no Rune types, so plain `cargo test` covers it. +//! `view` renders it; `start` is the browser entrypoint and `spec` feeds the native binary. + +pub mod core { + /// Which tasks the list shows. + #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] + pub enum Filter { + #[default] + All, + Open, + Done, + } + + #[derive(Clone, Debug, PartialEq, Eq)] + pub struct Task { + pub id: u32, + pub title: String, + pub done: bool, + } + + #[derive(Debug, PartialEq, Eq)] + pub enum AddError { + EmptyTitle, + } + + #[derive(Debug, Default)] + pub struct Tasks { + items: Vec, + next_id: u32, + pub filter: Filter, + } + + impl Tasks { + /// Adds a task with a trimmed title; an empty title leaves the list unchanged. + pub fn add(&mut self, title: &str) -> Result { + let title = title.trim(); + if title.is_empty() { + return Err(AddError::EmptyTitle); + } + let id = self.next_id; + self.next_id += 1; + self.items.push(Task { id, title: title.to_owned(), done: false }); + Ok(id) + } + + pub fn toggle(&mut self, id: u32) { + if let Some(task) = self.items.iter_mut().find(|t| t.id == id) { + task.done = !task.done; + } + } + + /// Filtering hides tasks; it never removes them. + pub fn visible(&self) -> impl Iterator { + self.items.iter().filter(move |t| match self.filter { + Filter::All => true, + Filter::Open => !t.done, + Filter::Done => t.done, + }) + } + + pub fn len(&self) -> usize { + self.items.len() + } + + pub fn is_empty(&self) -> bool { + self.items.is_empty() + } + } +} + +use core::{Filter, Tasks}; +use rune::tok::{self, type_}; +use rune::{AppSpec, Cx, El, ScrollSpec, TextEdit, col, el, row, text, text_input}; + +pub struct App { + pub tasks: Tasks, + pub draft: TextEdit, +} + +impl Default for App { + fn default() -> Self { + let mut tasks = Tasks::default(); + for title in ["Read the Rune README", "Render a headless PNG", "Ship the wasm bundle"] { + tasks.add(title).expect("seed titles are not empty"); + } + Self { tasks, draft: TextEdit::new("") } + } +} + +fn submit(app: &mut App, _: &mut rune::Tx) { + if app.tasks.add(&app.draft.text).is_ok() { + app.draft.clear(); + } +} + +fn chip(label: &'static str, key: &'static str, filter: Filter, current: Filter, dark: bool) -> El { + let t = tok::theme(dark); + let on = filter == current; + el().key(key).role("button").label(label).focusable(true) + .h(32.0).px(12.0).center().radius(16.0) + .fill(if on { tok::accent(0, dark) } else { t.control_off }) + .child(text(label).font(type_::LABEL).color(t.text)) + .on_press(move |app: &mut App| app.tasks.filter = filter) +} + +pub fn view(app: &App, cx: &mut Cx) -> El { + let dark = cx.system_dark(); + let t = tok::theme(dark); + let [top, right, bottom, left] = cx.safe_area(); + + let mut list = col().w_full().gap(8.0); + for task in app.tasks.visible() { + let id = task.id; + let mark = if task.done { "Done" } else { "Open" }; + list = list.child( + row().key(format!("task-{id}")).role("checkbox").label(task.title.clone()) + .checked(task.done).focusable(true) + .w_full().gap(12.0).padding(12.0).radius(10.0).fill(t.card) + .child(text(task.title.clone()).font(type_::BODY).color(t.text).grow(1.0)) + .child(text(mark).font(type_::LABEL).color(t.text_secondary)) + .on_press(move |app: &mut App| app.tasks.toggle(id)), + ); + } + + let input = text_input(&app.draft, type_::BODY).key("draft") + .placeholder("New task", t.text_secondary).color(t.text) + .grow(1.0).h(44.0).padding(12.0).radius(10.0).fill(t.card) + .on_edit(|app: &mut App| &mut app.draft).on_submit(submit); + let filters = row().gap(8.0) + .child(chip("All", "filter-all", Filter::All, app.tasks.filter, dark)) + .child(chip("Open", "filter-open", Filter::Open, app.tasks.filter, dark)) + .child(chip("Done", "filter-done", Filter::Done, app.tasks.filter, dark)); + + col().w_full().h_full().gap(12.0).fill(t.bg) + .pt(16.0 + top).pr(16.0 + right).pb(16.0 + bottom).pl(16.0 + left) + .child(text("Tasks").font(type_::TITLE).color(t.text)) + .child(input) + .child(filters) + .child(col().key("tasks").w_full().grow(1.0).shrink() + .scroll(ScrollSpec { stick_bottom: false }).child(list)) +} + +/// One spec for every host. Scenes name states that headless `--snap --scene` renders. +pub fn spec() -> AppSpec { + AppSpec:: { + scenes: &[ + ("first-done", |app| app.tasks.toggle(0)), + ("done-only", |app| { + app.tasks.toggle(0); + app.tasks.filter = Filter::Done; + }), + ], + ..AppSpec::new("Tasks", (390.0, 640.0), App::default, view) + } +} + +/// Browser entrypoint; on native the binary calls it. +#[cfg_attr(target_arch = "wasm32", wasm_bindgen::prelude::wasm_bindgen(start))] +pub fn start() { + rune::run(spec()); +} + +#[cfg(test)] +mod tests { + use super::core::{AddError, Filter, Tasks}; + use super::*; + use rune::{Env, Runtime}; + + #[test] + fn an_empty_title_is_rejected_without_changing_the_list() { + let mut tasks = Tasks::default(); + tasks.add("one").unwrap(); + assert_eq!(tasks.add(" "), Err(AddError::EmptyTitle)); + assert_eq!(tasks.len(), 1); + } + + #[test] + fn filtering_hides_tasks_but_keeps_them() { + let mut tasks = Tasks::default(); + let a = tasks.add("a").unwrap(); + tasks.add("b").unwrap(); + tasks.toggle(a); + tasks.filter = Filter::Done; + assert_eq!(tasks.visible().count(), 1); + tasks.filter = Filter::All; + assert_eq!(tasks.visible().count(), 2); + } + + #[test] + fn tapping_a_task_marks_it_done_through_the_real_view() { + let env = Env { system_dark: true, scale: 2.0 }; + let mut rt = Runtime::new(App::default(), view, (390.0, 640.0), env); + rt.frame(0.0); + let (x, y) = rt.find("task-1").expect("the second task is mounted"); + rt.pointer_down(x, y); + rt.pointer_up(x, y); + rt.frame(1.0 / 60.0); + assert!(rt.state.tasks.visible().any(|t| t.id == 1 && t.done)); + + let (x, y) = rt.find("filter-open").expect("the Open chip is mounted"); + rt.pointer_down(x, y); + rt.pointer_up(x, y); + rt.frame(1.0 / 60.0); + assert!(rt.find("task-1").is_none(), "a done task leaves the Open view"); + assert!(rt.find("task-0").is_some()); + } +} diff --git a/skills/visioncraft/assets/rune-web/main.rs.tmpl b/skills/visioncraft/assets/rune-web/main.rs.tmpl new file mode 100644 index 0000000..f25b86c --- /dev/null +++ b/skills/visioncraft/assets/rune-web/main.rs.tmpl @@ -0,0 +1,5 @@ +//! Native window, or headless tooling: `--snap out.png --scene first-done`, `--tree tree.json`, +//! `--script smoke.json --frames 30 --out frames/`. +fn main() { + rune_web_app::start(); +} diff --git a/skills/visioncraft/assets/rune-web/smoke.json b/skills/visioncraft/assets/rune-web/smoke.json new file mode 100644 index 0000000..bdb7b3d --- /dev/null +++ b/skills/visioncraft/assets/rune-web/smoke.json @@ -0,0 +1,5 @@ +{"events": [ + {"t": 0.1, "type": "tap", "key": "task-1"}, + {"t": 0.4, "type": "tap", "key": "filter-done"}, + {"t": 0.8, "type": "mark", "name": "end"} +]} diff --git a/skills/visioncraft/references/rust/browser-wasm.md b/skills/visioncraft/references/rust/browser-wasm.md index fd1f331..a2d0307 100644 --- a/skills/visioncraft/references/rust/browser-wasm.md +++ b/skills/visioncraft/references/rust/browser-wasm.md @@ -60,6 +60,7 @@ Use what the project already ships. Common pairings: |---|---|---| | Vite/React or another JS framework | `wasm-pack build --target web` or `wasm-bindgen` CLI, then `vite-plugin-wasm` | A small typed bridge module owns `init()` and re-exports the API | | Rust-only front end | `trunk` with Leptos, Yew, Dioxus or plain `web-sys` | Suitable when there is no existing JS shell to keep | +| Rust-native GPU UI, desktop and web from one crate | Rune's `scripts/web-build.sh` (git-pinned `rev`) | Canvas and WebGPU only; see [rune.md](rune.md) for when it fits and its evidence gates | | Worker or WebGPU compute | `wasm-bindgen` with `--target web`, or `wgpu` | Keep GPU resource ownership on one side of the boundary | Pin `wasm-bindgen` to the same version as the CLI that generates the bindings; diff --git a/skills/visioncraft/references/rust/rune.md b/skills/visioncraft/references/rust/rune.md new file mode 100644 index 0000000..2260bd3 --- /dev/null +++ b/skills/visioncraft/references/rust/rune.md @@ -0,0 +1,122 @@ +# Rune: a Rust-native UI for desktop and browser + +Independently written VisionCraft guidance (MIT OR Apache-2.0). Read it with +[browser-wasm.md](browser-wasm.md) when a user interface itself, not only the +logic beneath it, may be written in Rust. Rune is +[anomalyco/rune](https://github.com/anomalyco/rune) (MIT): a GPU-rendered UI +framework on `wgpu` and `winit` with its own layout, text, springs and +renderer, targeting macOS, Windows, Linux and, experimentally, the browser. +Facts below were checked against Rune revision +`781e2b6d87cd5f32d6f4365956fad4baaf24ee50` (2026-11-06). Rune is pre-release; +re-read its `README.md`, `WEB.md` and `CHANGELOG.md` at the revision you pin. + +## 1. When Rune is the right shell + +[browser-wasm.md](browser-wasm.md) moves logic into Rust and keeps the +project's existing UI framework. Rune is the option when the view layer +should be Rust as well and no JavaScript shell needs to be kept. + +| Choose Rune when | Choose a JS host or a DOM-based Rust framework when | +|---|---| +| The surface is an app-like tool, panel, editor, dashboard or visualisation | The surface is documents or content: articles, forms-heavy flows, anything needing browser find, text selection across the page, SEO or links that behave like links | +| One Rust crate should ship a desktop app and a web build from the same views | An existing React, Vue, Leptos, Yew or Dioxus shell already owns the product (§1 of browser-wasm.md: it stays) | +| Motion, GPU effects or 120 Hz interaction quality matter | Screen-reader support on the web is a requirement (see §4) | +| Agents should verify UI changes headlessly through PNGs, element trees and scripted input | Users may lack WebGPU and the opt-in WebGL2 fallback has not been proven for the app | + +Rune can also be mounted into one canvas of an existing page (§3), so a +JavaScript application can host a Rune panel without porting the rest. Record +the reason for the choice in the same way browser-wasm.md §5 requires. + +## 2. Dependency and naming traps + +- **Not on crates.io.** The registry's `rune` crate is an unrelated embeddable + scripting language. Depend on Rune by git with an exact `rev` from its `dev` + branch, which upstream keeps fast-forward-only so a pinned revision remains + fetchable. Never write `rune = "0.x"`; that resolves to the wrong project. +- **Bump deliberately.** Treat a `rev` change as a dependency upgrade: read the + changelog between the two revisions, rerun every gate in §5 and record the + old and new revisions. +- **Same name, other tools.** A host may ship an unrelated `rune` executable on + `PATH`. Rune the framework has no installed CLI; its tooling flags belong to + your app's own binary (§5). +- **Literal-constructed types.** Rune apps build some types such as `AppSpec` + and `Env` as struct literals with `..AppSpec::new(..)`, so a Rune upgrade can + add a field and break the build. Fix it at the upgrade, not by forking. + +## 3. Crate shape for desktop and web + +Use the scaffold in [`assets/rune-web/`](../../assets/rune-web/) as the +starting point. It is a working crate whose files carry a `.tmpl` suffix so that +they are never picked up as a nested Cargo package. Copy `Cargo.toml.tmpl` to +`Cargo.toml`, `lib.rs.tmpl` to `src/lib.rs` and `main.rs.tmpl` to `src/main.rs`, +then rename the package. It applies browser-wasm.md §2 to Rune: + +- `crate-type = ["cdylib", "rlib"]`: the browser bundle uses the cdylib; native + tests and the desktop/headless binary share the rlib. +- A `core` module with no Rune types holds state and transitions. Plain + `cargo test` covers it, and the view only renders it. +- One `spec()` function builds the `AppSpec`, including named `scenes` for + headless captures. `start()` calls `rune::run(spec())` and carries + `#[wasm_bindgen(start)]` on `wasm32` only; `main.rs` calls the same `start()`. +- `wasm-bindgen` is a `wasm32`-only dependency pinned with `=` to the installed + `wasm-bindgen` CLI version. +- Keep Rune's `dev`, `hot` and `native-file-dialog` features off for wasm, and + put native filesystem, process and thread dependencies behind + `cfg(not(target_arch = "wasm32"))`. Use `rune::time::Instant` for deadlines. +- Give interactive elements a stable `key`, a `role`, a `label` and, where it + applies, `checked` or `focusable`. Keys are how tests, scripts and element + trees address the UI; roles and labels feed native accessibility. + +**Mounting in a page.** By default Rune creates a full-viewport canvas. To host +it in an existing page or single-page-app route, use `App::canvas_id("id")` +with either `fit_content_height()` (inline, page keeps scrolling) or +`full_viewport()`, keep its `AppHandle` (`app.handle()`), and call `quit()` when the +route unmounts. One Rune app runs per page at a time. + +**Building.** Rune's `scripts/web-build.sh PACKAGE --out DIR` produces a static +folder (`index.html`, `app.js`, `app_bg.wasm`, `snippets/`). Use it from a +checkout of the same Rune revision. It calls `rustup which cargo`; on a host +without rustup, set `CARGO=$(command -v cargo)`. `--dev --watch` gives fast +rebuilds with page reload; never ship a `--dev` build. Serve the whole folder +with `.wasm` as `application/wasm`; WebGPU needs HTTPS except on `localhost`. + +## 4. Web-target limits to state up front + +At the checked revision the web target renders one canvas through WebGPU. +Rune's `webgl` feature (off by default) falls back to WebGL2 when no WebGPU +adapter is found; `WEB.md`'s scope paragraph still describes WebGL as later +work, so prove the fallback in a browser before relying on it. The web target +has no DOM accessibility mirror, so assistive technology does not see the +element tree on the web even though native builds expose it through AccessKit. +It also has no extra windows, overlays, native menus, networking layer, native +audio/video or hot patching. Fonts are bundled, not discovered: emoji and CJK +need font bytes in `AppSpec::fonts`. Expect a multi-megabyte `.wasm`: the +scaffold measured about 10.9 MB raw and 2.8 MB gzip at the checked revision +before `wasm-opt`. Set a budget and check it (browser-wasm.md §4). + +## 5. Evidence + +Rune's headless tooling lets an agent check UI work without a display. Extend +browser-wasm.md §4 with: + +1. **Native core tests**: `cargo test` on `core`. +2. **View tests through `rune::Runtime`**: construct + `Runtime::new(state, view, size, Env { .. })`, call `frame`, locate elements + with `find("key")`, drive `pointer_down`/`pointer_up`, then assert on + `rt.state` and on what is mounted. This exercises the real view and hit + testing without a GPU. +3. **Headless renders** from the app binary, on a host with a working GPU + adapter: `--snap out.png --scene NAME`, `--tree tree.json` (keys, roles, + labels, rects, colours) and `--script smoke.json` with `tap`, `type`, `key` + and `mark` events. Read the PNG and the tree; a successful exit alone is not + visual evidence. Motion changes can use `rune::motion_gate` in a test. +4. **wasm gates**: `cargo clippy --target wasm32-unknown-unknown -- -D warnings` + and the `web-build.sh` release build, with the printed raw and gzip sizes. +5. **A real browser journey** through the built folder: load it, confirm a GPU + adapter and no console errors, tap a keyed control and observe the change. + Use the host's browser tooling. Rune's `scripts/web-smoke.mjs` is a fuller + proof where Playwright is permitted. + +If the environment has no usable GPU adapter, steps 3 and 5 are visible +non-passes, not skipped rows. Steps 1, 2 and 4 still show the logic, view +wiring and bundle; they do not show pixels or a loaded page. diff --git a/skills/visioncraft/references/rust/steering.md b/skills/visioncraft/references/rust/steering.md index 53206e3..cd9b47e 100644 --- a/skills/visioncraft/references/rust/steering.md +++ b/skills/visioncraft/references/rust/steering.md @@ -33,6 +33,8 @@ external projects. - Browser-targeted logic defaults to Rust compiled to WebAssembly behind a thin JavaScript host; see [browser-wasm.md](browser-wasm.md) for scope, crate shape and the wasm-specific evidence gates. +- When the UI itself should be Rust across desktop and web, [rune.md](rune.md) + covers the Rune framework, its scaffold and its headless evidence. - These sections are a review rubric, not a demand for every possible tool on every edit. Scope tests and lint changes to meaningful risk; preserve existing compatibility and explain deliberate exceptions.