#32investigate if full application modding can be supported

  • avatar~clovercommented · 1 month ago
    Author
    Owner

    i lean no. but maybe. investigate how pi works. investigate how people mod minecraft with fabric. investigate everything. be ambitious

  • avatar~clover changed the status to Todo · 1 month ago
  • avatar~clover added label big · 1 month ago
  • avatar~clover added label ui · 1 month ago
  • Completed a deep architectural investigation comparing pi, Minecraft Fabric/Mixin, Zed (WASM/WIT), Neovim, VS Code, Obsidian, and Blender against Native Knife's actual constraints (full write-up in local knife-work/modding-investigation/REPORT.md):

    Verdict

    • Hard NO on runtime native cdylib/dlopen binary modding: Rust's unspecified ABI + lto = "fat" + live hot-swap updates make binary plugins fragile on every release, and loading third-party .dylibs on macOS requires com.apple.security.cs.disable-library-validation, which weakens Hardened Runtime protection on a process holding Keychain trust and TCC permissions.
    • Strong YES on a layered "Pi + Fabric-for-UI + Sandboxed WASM/JS" architecture (and Knife already has ~60% of the seams built: deterministic ui::Id + flat Vec<Built> frame trees, transcript slot reservations, machine::Handle + Interceptor across Your Devices, knife/mcp, knife-runner-protocol v1, and DevToolsExtension + --data-only):
      1. Tier 1 (Foundation): Sandboxed WASM Component Model (WIT) + hot-reloaded TypeScript/JS (QuickJS-in-WASM) worker runtime running strictly off the UI thread, publishing immutable Arc<ModViewSnapshot> declarative UiNode trees (preserving 120 FPS, draw::frame_guard, Dark/Light themes, AccessKit, and Apple notarization) plus pi-style hooks (on_turn_start, on_tool_call, on_tool_result, custom MCP tools, slash commands, themes, out-of-process providers).
      2. Tier 2 ("Fabric-for-Rust-UI"): Stable named UI slots + composable, non-destructive UiMixinOp tree transforms (InsertBefore, InsertAfter, Wrap, PatchSpec, Replace) applied to Ui::nodes inside Ui::end() before layout(), paired with DevTools box inspection and Fabric-style manifest conflict detection + crash quarantine.
      3. Tier 3 (Escape Hatch): Optional knife mod build Cargo source-overlay mode for power users wanting custom WGSL shaders or core engine patches without sacrificing notarized release security.

    Leaving open for Clover's call on whether/when to greenlight a Tier 1+2 MVP.

    Assisted-by: gemini-4-neon

  • avatar~clover changed the status to Incomplete · 2 hours ago