LWN: Comments on "Aya: writing BPF in Rust" https://lwn.net/Articles/859784/ This is a special feed containing comments posted to the individual LWN article titled "Aya: writing BPF in Rust". en-us Mon, 22 Sep 2025 03:54:49 +0000 Mon, 22 Sep 2025 03:54:49 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Aya: writing BPF in Rust https://lwn.net/Articles/860341/ https://lwn.net/Articles/860341/ notriddle <div class="FormattedComment"> It also means you get to use Cargo for everything, instead of having to staple together multiple build systems.<br> </div> Sun, 20 Jun 2021 16:39:23 +0000 Aya: writing BPF in Rust https://lwn.net/Articles/860191/ https://lwn.net/Articles/860191/ mkj <div class="FormattedComment"> Pure Rust crates mean you can very easily cross compile to any Rust-supported platform without having to find suitable libbpf etc to match. You can just copy a static binary (musl) to a beagleboard or raspberry pi and be done with it. <br> </div> Fri, 18 Jun 2021 03:54:15 +0000 Aya: writing BPF in Rust https://lwn.net/Articles/860187/ https://lwn.net/Articles/860187/ xinitrc <div class="FormattedComment"> Havn&#x27;t seen this one.<br> Hopefully it will be marked as production ready.<br> </div> Thu, 17 Jun 2021 23:43:57 +0000 Aya: writing BPF in Rust https://lwn.net/Articles/860082/ https://lwn.net/Articles/860082/ farnz <p>Apart from <a href="https://github.com/ixy-languages/ixy.rs">the ixy network driver</a>, you mean? Thu, 17 Jun 2021 08:50:26 +0000 Aya: writing BPF in Rust https://lwn.net/Articles/860066/ https://lwn.net/Articles/860066/ xinitrc <div class="FormattedComment"> still not a single driver on rust<br> </div> Thu, 17 Jun 2021 05:36:51 +0000 Aya: writing BPF in Rust https://lwn.net/Articles/859905/ https://lwn.net/Articles/859905/ danobi <div class="FormattedComment"> <font class="QuotedText">&gt; Pure Rust buys you a smaller surface area for certain types of bugs. In particular any memory safety bugs, because the compiler insists on seeing for itself why all the code you wrote doesn&#x27;t have memory safety bugs *unless* you explicitly marked it as unsafe.</font><br> <p> Yes, for sure. But I don&#x27;t think it&#x27;s a pure win. BPF has a huge surface area and libbpf handles lots of crazy features and edge cases. The tradeoff is that a re-implementation not only has to stay &quot;within spec&quot; (which there currently is none) but also keep up with new developments. And that has its own source of fun bugs.<br> <p> <font class="QuotedText">&gt; Also people really like Rust. I actually found I quite enjoy taking a C program and writing an equivalent Rust program, much more so than when I was learning Go for example.</font><br> <p> I do as well :). Disclosure: I wrote most of libbpf-rs (the rust wrappers around libbpf): <a href="https://github.com/libbpf/libbpf-rs">https://github.com/libbpf/libbpf-rs</a> .<br> </div> Tue, 15 Jun 2021 20:11:32 +0000 Aya: writing BPF in Rust https://lwn.net/Articles/859883/ https://lwn.net/Articles/859883/ tialaramex <div class="FormattedComment"> Pure Rust buys you a smaller surface area for certain types of bugs. In particular any memory safety bugs, because the compiler insists on seeing for itself why all the code you wrote doesn&#x27;t have memory safety bugs *unless* you explicitly marked it as unsafe. So logically if you experience a memory safety bug, it&#x27;s not hiding somewhere in apparently safe high-level stuff but must instead be in the (hopefully far smaller) unsafe part. Which also hopefully means the people who *wrote* that part were more careful when doing so.<br> <p> That can translate into more courage to try things you otherwise wouldn&#x27;t dare, and then when inevitably something goes wrong into more chance of figuring out where the actual bug is.<br> <p> Also people really like Rust. I actually found I quite enjoy taking a C program and writing an equivalent Rust program, much more so than when I was learning Go for example.<br> </div> Tue, 15 Jun 2021 18:50:21 +0000 Aya: writing BPF in Rust https://lwn.net/Articles/859868/ https://lwn.net/Articles/859868/ danobi <div class="FormattedComment"> A pure rust implementation is nice, but rust doesn&#x27;t have issues with FFI like go does. I&#x27;m curious what the pure rust buys the user in this case. Looking forward to see some examples.<br> </div> Tue, 15 Jun 2021 17:03:58 +0000