Rune:适用于 macOS、Windows、Linux 和 Web 的原生 GPU 渲染 Rust UI 框架
Rune: A native GPU-rendered Rust UI framework for macOS, Windows, Linux and web

原始链接: https://github.com/anomalyco/rune

Rune 是一个面向 macOS、Windows、Linux 和 Web 的原生 GPU 渲染 Rust UI 框架,自带渲染器、文本、布局和弹簧动画。应用可无头运行,以便代理渲染 PNG、检查元素树并驱动脚本输入。使用时从 `examples/hello` 和 `crates/rune/README.md` 开始,然后无头验证工作。从 `github.com/anomalyco/rune` 添加 `rune` 依赖,并固定到某个 dev 修订版本,因为 dev 分支永不重写。Rune 处于预发布阶段。文档、组件、示例和更新日志可用。项目不接受拉取请求;请改为提交描述 bug 或想法的 issue,通常会快速处理。由 Anomaly 以 MIT 许可证授权。

Hacker News 讨论了 anomalyco 的 Rune,一个面向 macOS、Windows、Linux 和 Web 的原生 GPU 渲染 Rust UI 框架。帖子有 30 分和 11 条评论。评论者指出其不寻常的工作流:没有拉取请求;代理提交 issue,维护者的代理快速响应。他们称赞无头渲染供代理渲染 PNG、检查元素树和驱动脚本输入。有人询问它与 GPUI 的比较,以及是否真正跨平台。其他人怀疑“原生”和“GPU 渲染”存在冲突,预测字体模糊、无障碍能力弱以及基于 winit 的限制。一些人将其描述为 vibe-coded 或 AI 生成的 Electron 替代品,而一人称其文档/代码显示 code smells 和不可维护的 slop。一位评论者指出 Chrome/Windows 上的 UI 故障。另一人认为它可能驱动 OpenCode。总体而言,反应混合了对代理友好工具的兴趣与对质量和术语的疑虑。
相关文章

原文

A native GPU-rendered Rust UI framework for macOS, Windows, Linux and the web, with its own renderer, text, layout and springs.

Every app can run headless, so an agent can render to PNG, dump the element tree and drive it with scripted input.

Rune in motion: real apps, rune-kit components and GPU effects

A coding agent app built with Rune

Lit chat interface Split diff component

Liquid metal effect Settings window

fn view(s: &State, _: &mut Cx<State>) -> El {
    let t = tok::theme(true);
    let label = text(if s.on { "Lights on" } else { "Lights off" })
        .font(type_::TITLE).color(t.text);
    let knob = el().key("knob").size(18.0, 18.0).radius(9.0).fill(t.knob)
        .absolute(if s.on { 18.0 } else { 2.0 }, 2.0);
    let switch = el().key("switch").role("switch").label("Lights").checked(s.on)
        .focusable(true).size(38.0, 22.0).radius(11.0)
        .fill(if s.on { tok::accent(0, true) } else { t.control_off })
        .motion(motion::SNAPPY)
        .on_press(|s: &mut State| s.on = !s.on)
        .child(knob);
    col().w_full().h_full().center().gap(16.0).fill(t.bg).child(label).child(switch)
}

Give your coding agent this repo. Have it start from examples/hello and crates/rune/README.md, then check its own work headlessly by rendering PNGs and inspecting the element tree.

Build me a with Rune (github.com/anomalyco/rune). Start from examples/hello and check your work headlessly.

rune = { git = "https://github.com/anomalyco/rune", rev = "<dev rev>" }

Rune is pre-release. Pin a rev of dev; dev is never rewritten.

Docs · Components · Examples · Changelog

We don't take pull requests. Have your agent open an issue describing the bug or idea, and our agents usually turn it around fast.

MIT, © Anomaly.

联系我们 contact @ memedata.com