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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Asterinas: OS kernel written in Rust and providing Linux-compatible ABI

364 点作者 Klasiaster7 个月前

29 条评论

akira25017 个月前
I personally dislike rust, but I love kernels, and so I&#x27;ll always check these projects out.<p>This is one of the nicer ones.<p>It looks pretty conservative in it&#x27;s use of Rust&#x27;s advanced features. The code looks pretty easy to read and follow. There&#x27;s actually a decent amount of comments (for rust code).<p>Not bad!
评论 #41855386 未加载
评论 #41852794 未加载
justmarc7 个月前
I&#x27;m interested in these kind of kernels to run very high performance network&#x2F;IO specific services on bare metal, with minimal system complexity&#x2F;overheads and hopefully better (potential) stability and security.<p>The big concern I have however is hardware support, specifically networking hardware.<p>I think a very interesting approach would be to boot the machine with a FreeBSD or Linux kernel, just for the purposes of hardware as well as network support, and use a sort of Rust OS&#x2F;abstraction layer for the rest, bypassing or simply not using the originally booted kernel for all user land specific stuff.
评论 #41853724 未加载
评论 #41853348 未加载
评论 #41853111 未加载
评论 #41855929 未加载
tiffanyh7 个月前
OT: if you&#x27;re interested in Asterinas, you might also be interested in Redox (entire OS written in Rust).<p><a href="https:&#x2F;&#x2F;www.redox-os.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.redox-os.org&#x2F;</a>
评论 #41863543 未加载
评论 #41851590 未加载
评论 #41854346 未加载
exabrial7 个月前
I think this looks incredible. Like how does one create a compatible abi _for all of linux_??? Wow!<p>&gt; utilize the more productive Rust programming language<p>Nitpick: it’s 2024 and these ‘more productive’ comparisons are silly, completely unscientific, And a bit of a red flag for your project: The most productive language for a developer is the one they understand what is happening one layer below the level of abstraction they are working with. Unless you’re comparing something rating Ruby vs RiscV assembly, it’s just hocus-pocus.
评论 #41855895 未加载
评论 #41857042 未加载
评论 #41855189 未加载
评论 #41854435 未加载
pjmlp7 个月前
Besides all examples, Microsoft is now using TockOS for Pluton firmware, another Rust based OS.<p><a href="https:&#x2F;&#x2F;tockos.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tockos.org&#x2F;</a>
treeshateorcs7 个月前
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=3AQ5lpXujGo" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=3AQ5lpXujGo</a> Asterinas: A safe Rust-based OS kernel for TEE by H. Tian &amp; C. Song (Ant Group &amp; Intel) | OC3 2024
评论 #41858827 未加载
Alexsky27 个月前
I’ll mention another OS written in Rust, Twizzler: <a href="https:&#x2F;&#x2F;twizzler.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;twizzler.io&#x2F;</a><p>Its more of a research OS but still cool.
评论 #41853035 未加载
hkalbasi7 个月前
&gt; In the framekernel OS architecture, the entire OS resides in the same address space (like a monolithic kernel) and is required to be written in Rust. However, there&#x27;s a twist---the kernel is partitioned in two halves ... the unprivileged Services must be written exclusively in safe Rust.<p>Unprivileged services can exploit known compiler bugs and do anything they want in safe Rust. How this affects their security model?
评论 #41858302 未加载
Klasiaster7 个月前
There was also the similar project Kerla¹ but development stalled. Recently people argued that instead of focusing on Rust-for-Linux it would be easier to create a drop-in replacement like these two. I wonder if there are enough people interested to make this happen as a sustained project.<p>¹ <a href="https:&#x2F;&#x2F;github.com&#x2F;nuta&#x2F;kerla&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;nuta&#x2F;kerla&#x2F;</a>
评论 #41855254 未加载
depressedpanda7 个月前
From the README:<p>&gt; Currently, Asterinas only supports x86-64 VMs. However, our aim for 2024 is to make Asterinas production-ready on x86-64 VMs.<p>I&#x27;m confused.
评论 #41852593 未加载
评论 #41852073 未加载
评论 #41852349 未加载
评论 #41857461 未加载
评论 #41852785 未加载
评论 #41852585 未加载
评论 #41852058 未加载
valunord7 个月前
I like what they&#x27;re working towards with V in Vinix as well. Exciting times to see such things with ABI compat with Linux opening new paradigms.
cryptonector7 个月前
&gt; Linux-compatible ABI<p>There&#x27;s no specification of that ABI, much less a compliance test suite. How complete is this compatibility?
评论 #41855540 未加载
评论 #41853746 未加载
phlip97 个月前
Super cool project. Looks like the short-term target use-case is running a Linux-compatible OS in an Intel TDX guest VM with a significantly safer and smaller TCB. Makes sense. This way you also postpone a lot of the HW driver development drudgery and instead only target VM devices.
spease7 个月前
What’s the intended use case for this? Backend containers?
评论 #41852605 未加载
wg07 个月前
Side question - I have always wondered how a Linux system is configured at the lowest level?<p>Let&#x27;s take example of network. There&#x27;s IP address, gateway, DNS, routes etc. Depending on distribution we might see something like netplan reading config files and then calling ABI functions?<p>Or Linux kernel directly also reads some config files? Probably not...
评论 #41856084 未加载
snvzz7 个月前
I looked into the architecture. It turns out to be monolithic with marketing[0].<p>Sure is a lot of text to say: We try to use unsafe as little as possible.<p>Which is the minimum you&#x27;d expect anyways ¯\_(ツ)_&#x2F;¯<p>0. <a href="https:&#x2F;&#x2F;asterinas.github.io&#x2F;book&#x2F;kernel&#x2F;the-framekernel-architecture.html" rel="nofollow">https:&#x2F;&#x2F;asterinas.github.io&#x2F;book&#x2F;kernel&#x2F;the-framekernel-arch...</a>
评论 #41857416 未加载
wiz21c7 个月前
&gt; Linux-compatible ABI<p>Does it mean it can re-use the drivers written for hardware to run with linux ?
评论 #41856885 未加载
评论 #41856538 未加载
apatheticonion7 个月前
I wish I could work on this as my paid day job.<p>As soon as I can financially retire, I&#x27;ll make contributing to this my full time job!
hulitu7 个月前
&gt; Asterinas: OS kernel written in Rust and providing Linux-compatible ABI<p>&gt; Currently, Asterinas only supports x86-64 VMs.<p>So no real hardware.
delduca7 个月前
This is exactly what I was discussing with a friend who works on the kernel. I don’t think Rust should be supported; the kernel should remain in C. Instead, a completely new kernel in Rust should be created with API&#x2F;ABI compatibility with the original kernel.
评论 #41876079 未加载
xiaodai7 个月前
Lol. I am Malaysian Chinese but I honestly don&#x27;t think anyone will put into production a Chinese made kernel. The risk is too high, same as no one will use a Linux distro coming out of Russian, Iran or NK. It&#x27;s just cultural bias in the west.
评论 #41864837 未加载
评论 #41854996 未加载
评论 #41854592 未加载
jackhalford7 个月前
The building process happens in a container?<p>&gt; If everything goes well, Asterinas is now up and running inside a VM.<p>Seems like the developers are very confident about it too
评论 #41853352 未加载
a99c43f2d5655047 个月前
Zig kernel when
评论 #41861710 未加载
fithisux7 个月前
Now we need Rust Windows compatible kernel to save us from Recall.
rpgraham847 个月前
oh cool, now I can have an unverifiable kernel from a team in China
weinzierl7 个月前
Decades ago Linus Torvalds was asked in an interview if he feared Linux to be replaced by something new. His answer was that some day someone young and hungry would come along, but unless they liked writing device drivers Linux would be safe.<p>This is all paraphrased from my memory, so take it with a grain of salt. I think the gist of it is still valid: Projects like Asterinas are interesting and have a place, but they will not replace Linux as we have it today.<p>(Asterinas, from what I understood, doesn&#x27;t claim to replace Linux, but it a common expectation.)
评论 #41853994 未加载
评论 #41856026 未加载
评论 #41854663 未加载
评论 #41857123 未加载
评论 #41859532 未加载
havaker7 个月前
The license choice is explained with the following:<p>&gt; [...] we accommodate the business need for proprietary kernel modules. Unlike GPL, the MPL permits the linking of MPL-covered files with proprietary code.<p>Glancing at the readme, it also looks like they are treating it as a big feature:<p>&gt; Asterinas surpasses Linux in terms of developer friendliness. It empowers kernel developers to [...] choose between releasing their kernel modules as open source or keeping them proprietary, thanks to the flexibility offered by MPL.<p>Can&#x27;t wait to glue some proprietary blobs to this new, secure rust kernel &#x2F;s
评论 #41853449 未加载
prmoustache7 个月前
&gt; docker run -it --privileged --network=host --device=&#x2F;dev&#x2F;kvm -v $(pwd)&#x2F;asterinas:&#x2F;root&#x2F;asterinas asterinas&#x2F;asterinas:0.9.3<p>Is that the new generation of curl | bashism in action?
评论 #41858101 未加载
评论 #41857251 未加载
评论 #41859535 未加载
sylware7 个月前
Linux is mostly a decades long maintained repository of real hardware programing code, and written in mostly simple &quot;kernel&quot; &#x27;C&#x27;, not some ultra complex syntax language (unfortunately, it has been tied to compiler specific extensions or &quot;modern C&quot; tantrums, _generic for instance).<p>Have a look at AMD GPU driver. Massive, and full of &#x27;stabilization&#x2F;work around&#x27; code... happening all the time, for years.<p>I guess, the real &quot;first thing first&quot; is to design hardware, performant hardware on latest silicon process , with a, as simple as possible, modern, standard and stable hardware programing interface. Because, for many types of hardware, &#x27;now we know how to do it properly&#x27; (command hardware ring buffers usually, or a good compromise for modern CPU architecture, like RISC-V).<p>Another angle of &quot;cleanup&quot;, I guess it would be the removal of many of the C compiler extension (or &quot;modern C&quot;) tantrums from linux, or at least proper alternatives with not-inline assembly to allow small and alternative compilers to step in.<p>Personally, I tend to write rv64 assembly (which I interpret on x86_64), but for the userland. If I code C, I push towards mostly &quot;simple and plain C99&quot;.<p>The more I think about it, the more I get the following coming to my mind: &#x27;hardware with simple standard interfaces&#x27; and standard assembly for the kernel.
评论 #41857629 未加载