TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

MotorOS: a Rust-first operating system for x64 VMs

328 点作者 sbt567超过 1 年前

18 条评论

faitswulff超过 1 年前
The author wrote this on reddit:<p>&gt; What does &quot;Rust-first&quot; mean here? It means not only that both the (micro) kernel and the drivers are implemented in Rust, but also that Rust is the first (and only, at the moment) language that userspace programs can be written in.<p>&gt; Although technically one can reverse-engineer the Rust-based ABI and the provided Rust toolchain to write apps for Motor OS in e.g. C, that is some work. But standard Rust programs (using standard Rust library, without FFI) will just compile and run - see e.g. <a href="https:&#x2F;&#x2F;github.com&#x2F;moturus&#x2F;motor-os&#x2F;tree&#x2F;main&#x2F;src&#x2F;bin&#x2F;httpd">https:&#x2F;&#x2F;github.com&#x2F;moturus&#x2F;motor-os&#x2F;tree&#x2F;main&#x2F;src&#x2F;bin&#x2F;httpd</a>.<p>&gt; This Rust-first approach is rather unique, as e.g. Redox uses relibc and C-based kernel ABI as the glue...<p><a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;190znk5&#x2F;mot%C5%ABrus_os_motor_os_a_rustfirst_operating_system&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;190znk5&#x2F;mot%C5%ABrus_...</a>
评论 #38910076 未加载
评论 #38913075 未加载
评论 #38908696 未加载
lasiotus超过 1 年前
I&#x27;m the project author&#x2F;dev. Thanks a lot for posting this, and for comments&#x2F;discussions!<p>I see two main concerns raised here:<p>(a) long-term viability and support (b) compilers, binary compatibility, etc.<p>While the first concern is definitely valid, and without a community this project will not succeed, I do believe that potential benefits of Motor OS (or a similarly focused&#x2F;structured project) will eventually result in a widely used new operating system. There are major problems with Linux inside VMs (and sometimes outside), and the Linux devs are not focused on this enough to clean things up anytime soon. I work on Linux Kernel at my day job, I know.<p>Re: compiler instability, binary compatibility, etc.: I&#x27;m sorry, I don&#x27;t understand what is the issue here. The latest Linux kernel can be compiled with different GCC or LLVM toolchains on x86_64, and the result will happily run old binaries compiled years ago with who knows what. repr(C) structs in rust are stable... So why so many concerns here?<p>Again, thank you all for your comments and questions - I&#x27;m happy to answer more (at least until my day job kicks in).
andyferris超过 1 年前
Out of curiousity, why would a small kernel take a whole 200ms to start on a modern computer? Wouldn&#x27;t it need to initialize some metadata for the memory pages, mount the filesystem, and try to launch an init process? I suppose there might be an ethernet driver and possibly something to pipe logs to (&quot;stdout&quot; for the VM) to initialize. Shouldn&#x27;t that all take a few microseconds?<p>Or is all the slowness in the host preparing the resources? (as in QEMU and KVM?)
评论 #38909016 未加载
评论 #38909001 未加载
评论 #38911440 未加载
评论 #38908968 未加载
评论 #38910701 未加载
评论 #38914573 未加载
bluejekyll超过 1 年前
One thing I keep hoping to see in all of these kernels in Rust is an async first kernel. Is there something that makes this particularly difficult or do folks not see the value in it? I know from following along with Phil Oppermann’s OS in Rust series that is definitely possible, but these last few OS’ in Rust seem to not be attempting this, <a href="https:&#x2F;&#x2F;os.phil-opp.com&#x2F;async-await&#x2F;" rel="nofollow">https:&#x2F;&#x2F;os.phil-opp.com&#x2F;async-await&#x2F;</a>
评论 #38910020 未加载
评论 #38913494 未加载
评论 #38908813 未加载
评论 #38913048 未加载
评论 #38910858 未加载
weinzierl超过 1 年前
Sounds interesting, but it also reminds me of what Linus once said when asked about fearing competition. From my memory his answer was something like: I really like writing device drivers. Few people like that and until someone young and hungry comes along who likes that I&#x27;m not afraid of competition.
评论 #38908842 未加载
评论 #38913771 未加载
评论 #38910907 未加载
cedws超过 1 年前
It sounds like a cool project and I hope it continues development, but there is such a huge graveyard of such projects that have never gone anywhere that I struggle to get excited about them anymore. Replacing Linux is really hard, even for specific uses like cloud.
评论 #38908740 未加载
paulirotta超过 1 年前
I was skeptical at first- the healthy approach to any new tech. But thinking again, the efficiency and security gains from stripping away layers of cruft after rather compelling
westurner超过 1 年前
&quot;Maestro: A Linux-compatible kernel in Rust&quot; (2023) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38852360#38857185">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38852360#38857185</a> ; redox-os, cosmic-de , Motūrus OS; MotorOS
duped超过 1 年前
&gt; Docker, Nix OS, &quot;serverless&quot;, etc. all exist because of Linux&#x27;s complexity<p>Docker and NixOS exist because of userspace problems with package management and serverless exists because businesses want to pay for compute on demand.
jacquesm超过 1 年前
It isn&#x27;t hard to start writing a new operating system. It is <i>very</i> hard to support that operating system for the next 5 decades.
评论 #38913765 未加载
jmull超过 1 年前
&gt; ...Docker, Nix OS, &quot;serverless&quot;, etc. all exist because of Linux&#x27;s complexity<p>Yeah, this seems like it&#x27;s more directly competing with those than Linux. I&#x27;d want to see those addressed in the &quot;Why?&quot; -- that is, why MotorOs instead of Docker, etc.?
评论 #38913301 未加载
评论 #38912194 未加载
micahcc超过 1 年前
&gt; a simple multi-processor round robin (SMP)<p>&gt; the kernel is very small and does not block, so does not need to be preemptible<p>I don&#x27;t believe you and I don&#x27;t even need to look at the code to know this is false.
评论 #38908832 未加载
ianbicking超过 1 年前
It could be cool if there was a WASM container built in Rust that could run in this OS. I don&#x27;t really have a sense of how complicated a WASM container is, though it seems non-trivial to even decide <i>what</i> such a thing is, so it would be nice not to treat the WASM container itself as the OS (i.e., more room to safely experiment). WASM also seems like it dodges the ABI issue by being more explicitly about composition instead of shared binary data structures.
评论 #38908993 未加载
Ericson2314超过 1 年前
&gt; Nix OS all exist because of Linux&#x27;s complexity<p>That said, I would be thrilled to build this and other alt OSes and their userlands with Nix &#x2F; Nixpkgs :).
评论 #38908978 未加载
pipeline_peak超过 1 年前
I don’t think swapping out the first order language does anything other than boxes out potential support.
xyst超过 1 年前
Kind of cool as a hobby OS.<p>But would be nice to backup your claims regarding performance with actual numbers.
评论 #38914185 未加载
aaa_aaa超过 1 年前
I think the most close to production ready &quot;mostly&quot; Rust OS is Fuchsia.
评论 #38913093 未加载
dravigon超过 1 年前
isn&#x27;t this similar to other microkernel and something like wasi&#x2F;wasm kinda addressing this the correct way ?