# Dioxus 全栈一年：Rust 的爽与痛

Original title: One year of Dioxus fullstack in production: the good, the painful

> Hacker News story 50265960 · language: zh · submitted 2026-10-27
> Web version: https://zeli.app/zh/story/50265960
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 23 · by [hauju](<https://news.ycombinator.com/user?id=hauju>) · 💬 12
[original](<https://oxidt.com/blog/one-year-of-dioxus-fullstack-in-production-the-good-the-painful>) · [HN discussion](<https://news.ycombinator.com/item?id=50265960>)

## Summary

我在生产环境中使用 Dioxus 全栈开发一年，Rust 代码本身成了最无聊的部分，但 CI 构建却成了最让人头疼的环节。GitHub 上的发布构建竟需 90 分钟，本地 WASM 编译也要 22 分钟。虽然单语言开发、前后端类型共享带来了巨大的重构安全感，但漫长的编译时间和对 JavaScript 工具链的依赖（如 Chart.js 和 Tailwind）让体验充满矛盾。对于仪表盘类应用，高昂的 WASM 构建成本是否值得？我正准备转向新的框架 Topcoat，期待它能保留 Rust 的优势，同时消除编译瓶颈。

## Key quote

> 人们常问“什么能让我最快推出产品？”，但更好的问题是“什么能让我持续产出而不讨厌我的生活？”

## HN discussion (12 comments)

### [pcj-github](<https://news.ycombinator.com/item?id=50267135>)

> 你的 LLM 可以在几次会话中把你的 cargo build 替换成 bazel。HN 上的 bazel 黑子们又要排队喷了……
>
> Rust 的支持已经变得相当不错，而且 Rust 规则的维护者就在 OpenAI 工作，顺便一提，OpenAI 至少有一部分 Rust 和 wasm 代码就是这样构建的：https://github.com/openai/codex/blob/main/MODULE.bazel。
>
> 我的项目里有一个相当复杂的 Rust 后端。我租了一台性能不错的裸金属构建服务器，每月约 150 美元，用来支撑我所有的个人 CI。它唯一的任务就是启动一个 systemd 服务，作为 GitHub Actions 的自托管 runner。我现在可以在大约 2-4 分钟内完成构建和发布，而以前光是本地开发迭代周期就要长达 10 分钟，更别提构建和发布整个项目了，那得花上整整一个小时。

### [nemothekid](<https://news.ycombinator.com/item?id=50266320>)

> \> 使用 Swatinem/rust-cache 进行缓存。这确实有用，但有个陷阱：工作流运行只能从自己的 ref 或默认分支恢复缓存，而且 GitHub 会回收 7 天未使用的缓存。
>
> \> 为重型构建使用自托管 runner。这无疑是最大的提升，构建时间从 90 分钟降到了 40 分钟。但这也意味着我现在得维护一台构建服务器。
>
> WarpBuild (https://www.warpbuild.com/)[1] 帮我解决了这些问题。
>
> 1. 你可以把缓存存到自己的 s3 bucket 里，这样就能自己管理回收策略。
>
> 2. 他们负责基础设施，或者你也可以关联自己的 AWS 账户。我的构建任务会运行在 spot instances 上，这些实例会在构建开始时按需请求。
>
> 至于缓存问题，我只需要设置一个定时任务，每天午夜在 master 分支重新运行一次构建。
>
> [1] 无利益关联，几个月前通过 Google 找到的

### [slopinthebag](<https://news.ycombinator.com/item?id=50266249>)

> 既然这篇文章（可能还有这个应用）都是 Claude 写的，我建议你让 Claude 在 CI 里用 sccache，这样能大幅缩短编译时间。

---

## Cite

- Page: https://zeli.app/zh/story/50265960
- Date: 2026-10-27
- Source: oxidt.com (https://oxidt.com/blog/one-year-of-dioxus-fullstack-in-production-the-good-the-painful)
- Hacker News: https://news.ycombinator.com/item?id=50265960

## Other languages

- en: https://zeli.app/story/50265960 · markdown: https://zeli.app/story/50265960.md
- ja: https://zeli.app/ja/story/50265960 · markdown: https://zeli.app/ja/story/50265960.md
- ko: https://zeli.app/ko/story/50265960 · markdown: https://zeli.app/ko/story/50265960.md
- de: https://zeli.app/de/story/50265960 · markdown: https://zeli.app/de/story/50265960.md
- es: https://zeli.app/es/story/50265960 · markdown: https://zeli.app/es/story/50265960.md
- ru: https://zeli.app/ru/story/50265960 · markdown: https://zeli.app/ru/story/50265960.md
