02-tech-stack

A project rulebook for AuroraView’s core technology choices, Python setup, web-page loading, and support for professional 3D and creative applications on Windows and other systems.

In plain words
What is it for?
Use it when building, testing, linting, packaging, or embedding HTML interfaces in applications such as Maya, Blender, Houdini, or Nuke.
Why use it?
It keeps development decisions consistent across Rust, Python, WebView, Qt, and host applications. It also reduces confusion about which commands and loading methods the project expects.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/loonghao/auroraview/02-tech-stack
Clone the repo
git clone --depth 1 https://github.com/loonghao/auroraview
Per session 1,050 This file is loaded in full into every session.
When invoked 1,050 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01050 $0.01050
Opus 5 $0.00525 $0.00525
Sonnet 5 $0.00210 $0.00210
Haiku 4.5 $0.00105 $0.00105

Measured 2d ago against content hash 5f53fb682cca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

02-tech-stack scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codebuddy/rules/02-tech-stack.mdc · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

核心技术栈(2025)

  • Windows: WebView2(Chromium Edge)+ Rust(windows-rs, webview2-com),以"父 HWND 子窗口"方式内嵌至 Qt 容器;UI 操作在 STA 线程执行
  • 跨 DCC:Maya/3ds Max/Houdini/Nuke 使用 Qt 宿主;Blender 采用浮动工具窗
  • Python 包:仅一个 .pyd(pyo3 + maturin),不引入第三方 Python 依赖
  • 并发模型:Rust 侧消息桥与调度,Qt 负责事件循环;Rust 不接管消息泵
  • 跨平台路线:macOS(WKWebView)、Linux(WebKitGTK 或 CEF/OSR)按需启用
  • 最低需要支持python-3.7
  • 我们的项目和环境管理使用 uv 来管理 Python 依赖,使用 just 作为任务运行器
# 使用 just 运行任务
just build          # 构建项目
just test           # 运行测试
just lint           # 运行代码检查

# 使用 uv 管理 Python 环境
uv pip install -e . # 安装 Python 包
uv run pytest       # 运行 Python 测试

HTML / 静态资源加载策略

  • 内联 HTML:WebView.load_html(html: str),适用于简单原型或不依赖本地静态资源的页面
  • 本地静态站点:优先使用 WebView.load_url("file:///.../index.html") 加载磁盘上的 HTML 文件;相对路径的图片/CSS/JS 由浏览器根据该文件路径解析
  • DCC + Qt 场景:QtWebView 只是一个 Qt 宿主 QWidget,所有导航行为都委托给核心 WebView
    • QtWebView.load_html(html: str)WebView.load_html(html)(不再暴露 base_url
    • QtWebView.load_url(url: str)WebView.load_url(url),其中 url 可以是 http://file:/// URL
  • 需要自定义相对路径解析时,推荐在 HTML 中使用 <base href="file:///.../"> 显式声明,而不是在 Python API 上引入 base_url 参数。

DCC 适配矩阵(Windows 优先)

  • Maya 2025+(Qt6/PySide6):QWidget.winId() → HWND;Qt 容器负责 resize/focus/DPI 事件
  • 3ds Max(Qt):QWidget.winId() → HWND;同 Maya 流程
  • Houdini(PySide2/Qt5):hou.qt.mainWindow().winId() → HWND;子 widget 作为容器
  • Nuke(PySide2/Qt):自定义 Panel 返回 QWidget;winId() → HWND
  • Blender(非 Qt):采用浮动/owned 顶层工具窗(Win32 + WebView2),提供置顶与尺寸钩子

Python 包与 API(零依赖)

  • 单一 .pyd:pyo3 + maturin,ABI3(按 DCC Python 版本矩阵构建 wheel)
  • API(示意):
    • create(parent_hwnd, x, y, w, h, url, opts) -> handle
    • set_bounds(handle, x, y, w, h)
    • navigate(handle, url)
    • eval(handle, js)
    • post_message(handle, json)
    • on_message(handle, callback)
    • dispose(handle)

Standalone 模式

  • 保留现有 wry/tao 模式用于独立运行和开发调试
  • 后续可迁移为 Win32 + WebView2 顶层窗口(不依赖 wry/winit),与 DCC 内嵌实现一致

Cargo Features(规划)

  • 默认:win-webview2 + python-bindings
  • 可选:wry-backend(standalone 兼容)
  • 预留:mac-wkwebview、linux-webkitgtk、linux-cef(OSR)

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 63 lines · 1,050 tokens per session scan A 5f53fb682cca

Subscribe to this mod's changes

02-tech-stack is a cursor rule published in the GitHub repository loonghao/auroraview (44 stars, last pushed 1mo ago), licensed MIT. It adds 1,050 tokens to every session, about $0.0052 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.