본문으로 건너뛰기
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 / 1,000자

이 양식은 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의 스킬 모두 보기

이 스킬의 문제 신고