本文へ移動
cccskills
無料GitHub で公開

rust-webgpu-game-engine

Build and verify custom Rust winit and wgpu games across native and wasm WebGPU while preserving deterministic simulation, safe async lifecycle ownership, shader contracts, scenario persistence, and honest evidence boundaries.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abiスター 19(GitHub 19 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Rust WebGPU Game Engine

Use this skill when implementing or debugging a custom Rust game that combines winit, wgpu, native targets, or browser WebGPU.

Start from authority boundaries

  • Keep deterministic game truth independent of windows, GPUs, wall clocks, storage, editor drafts, and advisory output.
  • Convert fixed-point state to floating point only in presentation code.
  • Let editors produce validated immutable scenarios before constructing a replacement simulation. Build replacements in temporaries and swap once.
  • Keep advisory or compute output presentation-only unless a separately designed deterministic contract explicitly authorizes it.

Research the locked APIs

Read Cargo.toml, Cargo.lock, and the pinned toolchain before coding. Query documentation for the exact locked winit, wgpu, Naga, and wasm-bindgen versions. Do not copy latest-version examples into an older lock without compiling the target. In particular, verify constructor ownership, enum variants, feature names, surface presentation, and web extension traits against the locked release.

Validate shaders before pipeline creation

  • Parse shipped WGSL with Naga and run full validation before passing it to wgpu.
  • Keep host vertex offsets, strides, buffer sizes, binding minimum sizes, and shader packing synchronized and tested.
  • Include source labels in parse and validation diagnostics.
  • Test shader contracts without requiring a live adapter; keep adapter-backed tests separate.

Keep coordinate spaces explicit

Use logical pixels for layout, primitive vertices, renderer viewport globals, and hit testing. Use physical pixels only for surface configuration. Convert pointer coordinates once at the platform boundary. Test high-DPI-sensitive transformations rather than inferring correctness from a normal-density display.

Own surfaces safely

Prefer an owned Arc<Window> when creating a 'static wgpu surface. Create native windows, instances, and surfaces on the winit thread. If native adapter/device acquisition moves to an executor, return it through a generation-checked mailbox and configure the latest surface size back on the winit thread.

Handle every acquisition state deliberately: render and present success; render/present before reconfiguring suboptimal frames; skip timeout and occlusion; reconfigure outdated surfaces; recreate lost surfaces from the retained instance/window; and make validation failures fatal. Never configure a zero extent or reconfigure while a live frame exists.

Use a separate browser lifecycle

  • Create the browser window in ApplicationHandler::resumed with winit's append, prevent-default, and focusable web attributes.
  • Require an explicit browser WebGPU backend when WebGL fallback is not part of the product.
  • Launch GPU creation with wasm_bindgen_futures::spawn_local.
  • Store Result<GpuContext, Error> in a same-thread Rc<RefCell<Option<_>>> mailbox and send only a generation marker through EventLoopProxy.
  • Replace the mailbox when invalidating a generation so a detached stale future cannot overwrite the current result. Do not require GpuContext: Send and do not block the browser event loop.
  • Use a wasm-compatible wall-clock implementation; a target compile alone will not reveal every unsupported std runtime operation.

Bound persistence and compute

Treat scenario JSON as untrusted. Enforce byte limits before parsing where the platform permits, deny unknown fields, avoid browser-unsafe numeric encodings, and make failed load/save/apply operations preserve active state.

For optional GPU advisory compute, publish the CPU oracle first. Carry epoch/request/model/source metadata, allow one in-flight readback, coalesce newer work, reject stale or non-finite results, compare with an explicit tolerance, and disable the GPU path for the failed device epoch while retaining CPU output. Never claim acceleration without measurements.

Verify in layers

Run formatting, strict Clippy, all headless tests, native release compilation, wasm target compilation, and the repository-owned pinned bundle script. Add source contract tests for cfg-sensitive browser code where native test runners cannot execute it. Then test native and browser runtime separately.

Report these as distinct evidence:

  • headless semantics;
  • native compilation;
  • wasm compilation;
  • bundle generation;
  • provider CI execution;
  • live native surface and first frame;
  • live browser canvas, WebGPU, input, and storage;
  • adapter-specific compute parity;
  • manual visual acceptance.

Never promote configuration, compilation, generated artifacts, an adapter skip, or a single-platform smoke into broader runtime support.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Maintain the Abbey / Aviva / Abi Discord system prompts in the Rust abbey-bot (`src/ask.rs`) and keep the hosted Grok bots (Grok Bot Abbey, Aviva Grok) in step with them. Use when the user says "improve grok bots", "abbey prompt", "persona prompt", "ask.rs", "system prompt", "tip floor", asks to change how Abbey/Aviva/Abi speak on Discord, or after an abbey-bot PR merges and the hosted bot's tip floor needs bumping. Runs as /abbey-system-prompt.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Validate ABI docs and external collateral against repo evidence and docs/contracts/external-claims-audit.mdx. Use when auditing claims, scanning docs for unsupported QPS/sharding/FHE/AES language, checking one claim before publish, or re-confirming the external-claims audit. Agent procedure only — not a CLI or slash command. Pair with abi-doc-claims-sync when editing docs.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Synchronize ABI Markdown and docs claims with executable behavior. Use before editing README, AGENTS.md, CLAUDE.md, GEMINI.md, docs/**/*.mdx, walkthroughs, changelogs, or any old ABI Markdown that mentions WDBX, MCP, GPU, clustering, compression, FHE, agents, or benchmarks.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Plan and execute ABI repo work from the TODO board, roadmap/spec docs, stable Rust 1.99.1 constraints, and validation gates. Use when the user asks to find ABI todos/roadmaps, organize a large implementation from tasks/todo.md, or decide the next safe work slice. Distinct from the goals skill — that skill owns the persistent ledger tasks/goals.md; this skill plans from the active board and north-star specs.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Validate ABI MCP JSON-RPC stdio and its custom loopback HTTP compatibility endpoint, including auth, limits, notifications, and shutdown.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

Review ABI's 16 compiled-in plugin fixtures, manifest validation, manual bundled registry, and real CLI/MCP run dispatch without claiming dynamic loading.

日本語の概要は準備中です。原文の説明を表示しています。

donaldfilimon/abi192026年10月27日 更新

donaldfilimon のスキルをすべて見る

このスキルの問題を報告する