Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2024 15:33:44 +0200
From:      me@levitati.ng
To:        freebsd-hackers@freebsd.org
Subject:   Re: The Case for Rust (in the base system)
Message-ID:  <4E4E3807-EE79-4C7A-920A-2927D40D932C@levitati.ng>
In-Reply-To: <202409031503.aa12667@berenice.pkmab.se>
References:  <202409031503.aa12667@berenice.pkmab.se>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
It can, just pass the --emit=obj flag to rustc.

Rust also allows you to create functions with the C ABI.

On September 3, 2024 3:03:20 PM GMT+02:00, ske-89@pkmab.se wrote:
>With all this talk about Rust in the OS kernels, can someone
>explain to me why Rust can't simply produce object files that
>can be linked into the kernel like any C object file? (If you
>just avoid calling Rust-specific libraries, just like you don't
>call the C standard library either from within the kernel.)
>
>I haven't worked with Rust, and the introductions to Rust that
>I have read do not discuss this.
>
>/Kristoffer Eriksson
>

[-- Attachment #2 --]
<html><head></head><body><div dir="auto">It can, just pass the --emit=obj flag to rustc.<br><br>Rust also allows you to create functions with the C ABI.</div><br><br><div class="gmail_quote"><div dir="auto">On September 3, 2024 3:03:20 PM GMT+02:00, ske-89@pkmab.se wrote:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><div dir="auto">With all this talk about Rust in the OS kernels, can someone<br>explain to me why Rust can't simply produce object files that<br>can be linked into the kernel like any C object file? (If you<br>just avoid calling Rust-specific libraries, just like you don't<br>call the C standard library either from within the kernel.)<br><br>I haven't worked with Rust, and the introductions to Rust that<br>I have read do not discuss this.<br><br>/Kristoffer Eriksson<br><br></div></pre></blockquote></div></body></html>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E4E3807-EE79-4C7A-920A-2927D40D932C>