Show HN: 一周时间将关于操作系统设计的讨论变成了真正的操作系统
1 分•作者: jonathanrtuck•5 个月前
上周五,我开始和 Claude 聊操作系统。那次对话变成了一场设计讨论。设计讨论又变成了一个原型。从那以后,我几乎就没停下来过。
核心想法是:你的文件存在于应用程序内部。应用程序决定你如何查看内容、可以对内容做什么以及你的工作保存在哪里。如果操作系统可以直接理解你的文件——渲染它们、索引它们、跟踪它们的历史——并且编辑器只是在你需要更改某些内容时才使用的工具,会怎么样呢?没有“打开方式”。没有保存按钮。默认情况下是查看,编辑是深思熟虑的行为。
一周后的成果:一个用 Rust 从头开始编写的基于 QEMU (aarch64) 的内核,27 个系统调用,带有 4 个 SMP 核心的 EEVDF 调度器,完整的显示管道(合成器、子像素 TrueType 渲染、alpha 混合、PNG 图像查看器),通过共享内存环形缓冲区的结构化 IPC,一个编辑器进程模型(操作系统服务是唯一的写入者),一个文件系统原型,900 多个测试,包括正式的错误审计,以及大约 2200 行的设计文档,其中包含 13 个已确定的架构决策。而我周五之前甚至都没见过 Rust 代码。
完整的故事,包括演示、逐日时间线、我如何与 AI 合作以及我学到了什么:[https://github.com/jonathanrtuck/os/discussions/1](https://github.com/jonathanrtuck/os/discussions/1)
代码库:[https://github.com/jonathanrtuck/os](https://github.com/jonathanrtuck/os)
我不是想构建下一个 Linux。这是一次设计探索——如果从内核开始重新思考整个堆栈,OpenDoc 和 Xerox Star 尝试的以文档为中心的模型是否真的可行?我真的很好奇这个社区的想法。
查看原文
Last Friday I started a conversation with Claude about operating systems. That conversation turned into a design session. The design session turned into a prototype. I haven’t really stopped since.<p>The core idea: your files live inside applications. The app decides how you see your content, what you can do with it, and where your work gets saved. What if the OS just understood your files directly — rendered them, indexed them, tracked their history — and editors were tools you picked up only when you needed to change something? No “open with.” No Save button. You view by default, editing is deliberate.<p>What exists after one week: a from-scratch kernel in Rust on QEMU (aarch64), 27 syscalls, EEVDF scheduler with 4 SMP cores, a full display pipeline (compositor, subpixel TrueType rendering, alpha blending, PNG image viewer), structured IPC via shared-memory ring buffers, an editor process model where the OS service is the sole writer, a filesystem prototype, 900+ tests including a formal bug audit, and ~2,200 lines of design documentation with 13 settled architectural decisions. I’d never even seen Rust code before Friday.<p>Full story with demo, day-by-day timeline, how I worked with AI, and what I learned: <a href="https://github.com/jonathanrtuck/os/discussions/1" rel="nofollow">https://github.com/jonathanrtuck/os/discussions/1</a><p>Repo: <a href="https://github.com/jonathanrtuck/os" rel="nofollow">https://github.com/jonathanrtuck/os</a><p>I’m not trying to build the next Linux. This is a design exploration — can the document-centric model that OpenDoc and Xerox Star attempted actually work if you rethink the whole stack from the kernel up? I’m genuinely curious what this community thinks.