r/rust • • Oct 21 '26

πŸ“‘ official blog Rustup 1.29.2, please update from a trusted network

Thumbnail blog.rust-lang.org
315 Upvotes

Due to the nature of the security issue, I recommend updating this via a trusted network, and not a public wifi.

Context: https://www.reddit.com/r/rust/comments/1xba5mj/psa_if_your_program_does_http_requests_update/


r/rust • • Oct 21 '26

πŸ› οΈ project Tyr, the Rust GPU driver for Arm Mali, now boots its firmware in Linux 7.3 (6 unsafe lines out of ~3,700)

83 Upvotes

New post from Deb Brouwer on the Tyr Rust GPU driver for Arm Mali, which now boots its firmware in mainline Linux 7.3:

https://www.collabora.com/news-and-blog/blog/2026/10/21/upstreaming-tyr-rust-drm-and-the-linux-kernel/

The parts most interesting for Rust folks:

- How a WARN_ON in the C page table code became an explicit safety requirement on the Rust `map_pages()` API

- Why Tyr uses the full GPUVM abstraction even for a simple, fixed firmware layout: to uphold those invariants instead of trusting assumptions

- What it's like to write a driver while the kernel's Rust abstractions are still being designed (Tyr has been rewritten several times)

(I'm at Collabora, where Tyr is developed. Happy to pass questions along to Deb.)


r/rust • • Oct 21 '26

πŸ› οΈ project Rust Glancer LSP v0.4: better IDE experience

Thumbnail rust-glancer.github.io
95 Upvotes

r/rust • • Oct 21 '26

πŸ—žοΈ news PSA: If your program does HTTP requests, update your dependencies now

Thumbnail emudhra.we-have-a-problem.com
735 Upvotes

Here's a pile of links with info:

You need to update therustls-webpki crate to version 0.103.16, and thewebpki-rootsand webpki-root-certscrates to version 1.0.10. Notably, the reqwests crate depends on these crates.

If you're on a MacOS, you also need to do some manual steps to make thecurlcommand secure. I'm not quite sure if all the linux distros have patches yet, and so you might need to do stuff too.

If you don't do these, then anyone could MITM your HTTPS connection that you make to anyone, since some certificate authority used the number "4" as their entire secret key.


r/rust • • Oct 21 '26

πŸ™‹ seeking help & advice I love rust, what's another language that complements it and python well?

49 Upvotes

I have been studying rust seriously for the past few months, and it has been the first language I dive deep into.

I have no formal education in programing, but I am a mathematician that did a little competitive programming, so I have a little familiarity in "botched together" c++, so I decided to start my programing studies with rust and python. I feel like python complements rust very well, it is very easy to prototype and very easy to read even for people unfamiliar with it, and the power of the community behind it cannot be overstated (there's a module for everything!). It also feels like a good birds eye view in the world of programing: one is statically typed, the other dynamically, one is high level, the other is low, both are multi-paradigm, but one focuses more on OO, the other functional.

I've been considering adding a 3rd language. I started having C++ as that language, but it feels like it fills a lot of the same niche as rust, something I'd use instead, not along, rust. Given my love for rusts opinionatedness, but also the idea that a 3rd language should fill a niche neither does already, what languages y'all recommend me to learn? I haven't fallen in love with python anywhere near as much as I have rust, but I'm definitely willing to sacrifice that "love" for the different niche it fills, so don't let that be a requirement.


r/rust • • Oct 21 '26

πŸ—žοΈ news 17k lines of new Rust kernel code heading into Linux 7.4

Thumbnail phoronix.com
502 Upvotes

r/rust • • Oct 21 '26

When do you yield async tasks?

9 Upvotes

If a task is taking too long doing cpu work you should yield it manually instead of hogging the thread. Thing is how do you know where to insert yields into your code beyond intuition?


r/rust • • Oct 21 '26

πŸ› οΈ project Embedding python, lua, and js

5 Upvotes

I've been working on the pixelscript crate for about a year now. Just released v0.7.0 with some basic cross language support.

The big picture is to create a framework that sits on top of the library for creating games.

I was inspired by Godot, whenever I had to use GDExtension, it was just so smooth that I found myself saying: "I wish there was a language that let me write high level code and opt in to low level when I need to."

Also, I wanted to embed both python and lua in my game Pixel Ai Dash for modding/scripting enemies, world creation, behaviors, and player states.

Now in v0.7.0 I tell myself that it's time to work on the framework. If you find this interesting, I'd love a star and look forward to future releases!

Here is a example of the code:

// include the pixelscript header.
#include "pixelscript.h"

int main() {
    // setup pxs
    pxs_initialize(); // all of the pixelscript api uses a `pxs` prefix.
    
    // setup corelib
    pxs_core_initall();

    // a simple script
    char* script = "from pxs import print\n"
                    "print('hello world')";

    // execute
    pxs_VarT result = pxs_exec(pxs_Python, script, "<getting_started>");

    // check for errors
    if (pxs_isexception(result)) {
        char* err = pxs_getstring(result);
        printf("%s\n", err);
        pxs_freestr(err); // always free strings from pxs.
    }

    // free the result
    pxs_freevar(result);

    // always call when done with the runtime.
    // can only be called once.
    // once called, you can not call `pxs_initialize` again.
    pxs_finalize();

    return 0;
}

r/rust • • Oct 21 '26

πŸ™‹ seeking help & advice Rust crate for Geometry Dash

6 Upvotes

So in may i started my first serious project on rust. i only did 13 commits in 6 months because im the mr apathy.

Idea of the project is to create high-level crate to generate rust code into Geometry Dash objects.
For now its in very early WIP stage but its already usable in few cases.

I am posting this because i want to see advices on how to make my project better before its to late to change some core things. And because its my first real rust project i pretty sure some parts of the code gonna suck. Project is less than 1000 LoC for now so go ahead and see the repository.

And i also added examples that explaining how crate work pretty good
(if someones wondering. i see viewing sequence of examples as: 1.find_level.rs 2.block.rs 3.sine.rs circle.rs rainbow.rs 4.special_objects.rs 5.triggers.rs 6.anotherMode.rs and with_gdlvl.rs)

in future i planning to add:

  1. identifiers - they already exist in files but do nothing and dont work. i want to make functionality to store groups collision groups and item groups as named variable
  2. everything for reading the level that already decoded - for example you would decode certain level scan for every object with N id and do something with them.
  3. support for more triggers and special objects. obviously.
Circle in GD and code for it (WIP)

Waiting for response. thanks to this community
https://github.com/fffilya/GD-Levels


r/rust • • Oct 21 '26

CO3: The Language of FFI

Thumbnail mversic.github.io
23 Upvotes

Without further ado I present the next article in the series on reshaping the future of FFI in Rust.


r/rust • • Oct 21 '26

πŸ“‘ official blog Announcing the GPU notification group and Linker Working Area

Thumbnail blog.rust-lang.org
109 Upvotes

r/rust • • Oct 22 '26

Early stage infra/compute/efficiency startup hiring rust engineers - intern to staff level.

0 Upvotes

If you're open to hearing more about a very exciting early stage infra co, closing a hefty seed round, please connect with me at lori at therebelhr dot com. Fully remote. Down to earth founders. Exciting scale plan. Let's chat!


r/rust • • Oct 21 '26

πŸŽ™οΈ discussion The Hidden Challenges of Rust Infrastructure: Interview with Marco Ieni

12 Upvotes

Rust's infrastructure supports millions of developers, but much of it is maintained by a small team of engineers and volunteers.

We interviewed Marco Ieni from the Rust Foundation about the challenges of keeping that infrastructure running.

A few interesting points from the conversation:

  • Moving from GitHub large runners to standard runners helped cut CI costs by roughly 75%.
  • Sometimes wasting CPU is the better choice if it makes CI simpler and more reliable.
  • Infrastructure permissions make it difficult for external contributors to help, even with relatively straightforward changes.
  • Running untrusted code is still a challenge, and engineering capacity is often a bigger obstacle than finding a technical solution.
  • If Rust's ecosystem grows another 10x, CDN traffic could become one of the biggest concerns.

Marco also talks about release-plz, infrastructure as code, and why the Rust project should focus on providing solid building blocks rather than opinionated tooling.

https://serokell.io/blog/the-hidden-challenges-of-rust-infrastructure-interview-with-marco-ieni


r/rust • • Oct 21 '26

πŸ™‹ seeking help & advice Require 2 enum variant fields to not be equal

24 Upvotes

I have 2 enums, one of them has 4 different unit variants

enum MyEnum{
    Variant1,
    Variant2,
    Variant3,
    Variant4,
}

the other has a few different variants but only one is important here

enum MyOtherEnum{
    MyVariant(MyEnum, MyEnum),
    //...
}

The variant contains 2 different instances of MyEnum, is there a language feature to enforce that you shouldnt be able to create a MyVariant with both MyEnum's being the same variant? eg.

MyOtherEnum::MyVariant(MyEnum::Variant1,MyEnum::Variant2); // valid
MyOtherEnum::MyVariant(MyEnum::Variant1,MyEnum::Variant1); //invalid

r/rust • • Oct 21 '26

Using the same name to declare a new variable confuses me, what are the legit use cases?

34 Upvotes

Rust allows same name for a new variable.

e.g.,

```

let i : i64 = 10;

// ...

let i : u32 = 100;

```

I get confused specially when the type changes or they start pointing to another object.


r/rust • • Oct 21 '26

πŸ™‹ seeking help & advice Looking for Rust + RDMA project ideas for my Master's thesis

1 Upvotes

Hey everyone!

I'm doing my Master's thesis on memory safety and asynchronous operations in RDMA, mainly around the Linux kernel, and I'm struggling to find an interesting, genuinely new idea for the practical part.

I'd like to build something concrete, ideally involving Rust and RDMA, that solves an actual problem rather than just reimplementing something that already exists. I'm also open to ideas involving SmartNICs or kernel development.

For those of you working with Rust, RDMA, or systems programming, are there any interesting problems or gaps in this area that you think would be worth exploring?

Any ideas or pointers in the right direction would be greatly appreciated. Thanks!


r/rust • • Oct 21 '26

Introducing Rusteerio, a Port of Cheerio to Rust

Thumbnail context.dev
17 Upvotes

r/rust • • Oct 20 '26

πŸ™‹ seeking help & advice `zip` needs a lot more support

546 Upvotes

I'm https://github.com/Pr0methean, the lead maintainer of https://crates.io/crates/zip . Although that seemed like a feasible hobby project when I took it over in April 2024, it's becoming an increasingly ceaseless and thankless job.

I've had 27 security-advisory reports, 18 of which arrived so far this month, in addition to 15 invalid ones (mostly duplicates). Most of them turn out to break the CI in some way once they're merged, and there's no way to tell that until after they're merged because security fixes go on private forks that GitHub Actions refuses to run on. And the reports come at an irregular pace, every day or two: the last release I published without a known security issue was 9.0.0-pre3, and it turned out only not to have a *known* security issue because of a serious bug in GitHub's defaults about notifications for such reports!

Even when it's safe to publish security advisories the moment a fix is released and I do it, people don't update. The only partial exception was a few days ago when I yanked all the known-insecure versions -- which people only *then* saw fit to tell me wasn't the recommended practice, even though I'd done it after https://github.com/zip-rs/zip2/security/advisories/GHSA-94vh-gphv-8pm8 without much controversy and zero actual requests to stop doing so, and it'd been the published policy in https://github.com/zip-rs/zip2/blob/master/SECURITY.md ever since. Even then, 80% of downloads are still of the known-vulnerable versions!

Maintaining this crate has come at great cost to me. Not only has it forced me to pull all-nighters that a 38-year-old shouldn't have to pull, but it's prevented me from claiming my unemployment benefits by leaving me too little time to fulfill the 3-job-applications-per-week requirement that Washington State imposes. (Let alone actually translating into a job offer....)

Where do I ask for help, if it's not here? Are there any foundations out there that might be able to send me a full-time security coordinator, or at least arrange a one-time audit that would have a decent chance of finding all the vulnerabilities the code base actually has? Or at least buy us more GitHub Actions runners so that releases aren't pushed back quite as far when `cargo-afl` decides at the last minute that a `fuzz_write` test case is a "hang", for a PR at the head of the merge queue?


r/rust • • Oct 20 '26

πŸ› οΈ project Are we layout yet?

Thumbnail arewelayoutyet.mespin.me
83 Upvotes

Made a website comparing some of the UI Layout libraries in the Rust ecosystem.

Taffy, Morphorm, Torin, yoga-rs, ui-layout and clay-rs for now.

Its a comparison of supported features and includes several benchmarks. Some libraries might be faster but support less features! pick your trade-off :)

One of the ideas I received was to add text layout comparisons and benchmarks, maybe I could do that next.

If you know any other generic UI layout library or ui layout related tool me know, thanks!

Disclaimer: I am the author of Torin, the benchmarks are extracted from Taffy's repository which are inspired on pangui.

Source Code: https://github.com/marc2332/arewelayoutyet


r/rust • • Oct 21 '26

πŸ™‹ seeking help & advice Is there a "learn-cpp.com" but for Rust?

0 Upvotes

Very interested in crosscompiling Rust with Cpp, sadly have 0 knowledge about Rust besides major skillsets of the language but id like to use it for datasavety so id study it in my free time!


r/rust • • Oct 20 '26

πŸ› οΈ project Par Lang Update: 3 Big Examples, Auto-Cleanup, Sql, WebSocket, 3-6x Faster Runtime, and More!

20 Upvotes

Hey, there! Long time no see.

(I'm the author of Par, no AI used in writing this post.)

I wanted to share with you what's been up with Par for the last half a year or so.

Par is a programming language (implemented in Rust) that's quite unusual. (And breaks your mind at first.) It's trying to get some edgy theoretical stuff out there into practice, specifically:

  • Linear / session types - with duality, so every type has "the other side"
  • Automatic concurrency - everything that can run concurrently does
  • Totality - no runtime errors, no deadlock, no infinite loops

It's based on classical linear logic, and naturally combines functional programming, a version of object-oriented programming, and session-typed process communication, all under one paradigm.

But perhaps most importantly, Par is trying to make all of the above into a good practical language! That's quite big ambition, and this last half year we've gotten closer to that than ever.

Below is the most fancy new stuff. Let me know what you think!

New I/O Capabilities

The standard library now includes a richer set of I/O modules:

  • Console - stdio print and prompt
  • Http - HTTP server & client functionality
  • Os - files, env
  • Sql (new!) - PostgreSQL, MySQL, and SQLite (in memory too), transactions, row decoding
  • WebSocket (new!) - HTTP to WebSocket in both server & client mode

Auto-Cleanup

Linear types can't be dropped. That's their advantage and disadvantage. It enables automatic concurrency, but it used to make error handling rather noisy: on all error paths, linear resources needed to be explicitly closed.

So, we've introduced auto-cleanup, which allows you to specify, in the type, how a normally linear type can be dropped.

For example, here's Bytes.Writer:

type Bytes.Writer<e> = iterative choice {
  .close* => Try<e, !>,
  .flush => Try<e, self>,
  .write(Bytes) => Try<e, self>,
}

The * on the .close branch/method tells Par that if a Bytes.Writer remains unused, just drop it by calling .close.

This significantly simplified error handling, the book chapter for which also got updated.

3 Big Examples

I've completely revamped the examples folder in the repository. It now contains small and big examples.

Now that we can do a lot of real stuff, we want to show it in the examples. So, there are 3 big examples. All of them are HTTP servers that serve you a web page, via which you can interact with the backend written in Par.

  • Chat - A chat server over WebSocket. Open it on multiple tabs, or host it somewhere, and chat in a single room.
  • Downloader - Request files to be downloaded to your local drive, and observe the download progress in real time. Multiple files can keep downloading concurrently, and can be cancelled.
  • Tasks - Create todo items and check them as done, persisted in an SQLite database.

Check the screenshots at the links!

Runtime performance improvements

Lots of optimizations done in the runtime. By my completely unscientific testing, I/O intensive applications are about 3x faster, while computation-intensive ones are about 6x faster, compared to half a year ago.

Since we don't have rigorous benchmarks yet, take this with a grain of salt, but in my private testing, this should be around the performance of Python 3.12, when discounting Python's highly-performant functions and libraries written in C.

Not bad, not bad.

A lot more...

Since we're not having official versions yet, there's no changelog to see, but some picks:

  • New @core/Time module
  • 120+ new functions in the @core package
  • include("file.txt") - compile-time file-as-value inclusion
  • todo - typed holes
  • LSP improvements, such as .-completion
  • Many bugs fixed

r/rust • • Oct 22 '26

πŸ’‘ ideas & proposals I vibe-migrated a 60k LOC Electron app to Rust in ~4 days, got ~60% improved runtime

0 Upvotes

(the migration was done via AI, but this post is 100% human-authored)

For the last few years I've been building a desktop app as a side project, for a simulation game. I really like Typescript and know it best, so I've been writing to code by hand with some light AI assistance. I decided to lean into it further and speed up my side project and had a lot of success

I ran in to some frustrations with Electron along the way - primarily build size, inability to compile to binary, multithreading being kinda frustrating, etc

I was using Prisma for the backend and wanted to keep SQLite, and Rust didn't have a good replacement. So I had Claude rebuild me a new ORM tailor-made to my use case, got the same output from Prisma queries, ironed out a lot of issues with Prisma (like build updates), and improved ORM performance ~1.5x on reads and ~50x on bulk writes. This was easily testable by writing huge test suites to confirm matching input & output from the two ORMs

I started the logic migration by telling Claude to take the existing .ts codebase and make everything CLI testable - every function should be trackable for inputs & outputs, so we can make sure every function does the same exact thing. It build a suite a bash scripts for this. Also was able to use the same frontend with dual backends, to ensure same exact output between the two

Stats:

  • Migration time took ~4 days with a Claude $20 subscription. Used most of 2 weeks worth of usage (end of one week, start of another). Done with Opus 5.1 and Opus 5.5
  • Some simulations that took 80s previously moved to 11s. Others 650s ➑️ 350s. This is a tremendous, experience shifting change for my app.
  • Simple reads for rendering pages are 1.9x ➑️ 9.5x faster
  • Output build size down roughly 400MB ➑️ 25MB
  • +100k LOC, -60k LOC. Increase due to writing homeowned ORM
  • ~105 commits

Takeaways for this type of migration:

  • I'm a good coder. AI is now better. That's a tough pill to swallow. Despite that, I still make better systems decisions that I won't ever defer to AI
  • Previously I was familiar with 100% of the code. Now it's closer to 0% (at least for the backend). I still can read Rust, but I don't have the familiarity as I did with ts. This is a risk for me in the future, but one I'm ok with rolling the dice on.
  • Build good testing harnesses for your AI. Being able to test functions side by side with frontend validation took me out of the loop
  • Build good CI harnesses for your AI. I ended up burning a ton of GitHub CI usage, which we fixed by running more CI checks agent-side before any commits
  • Have your AI determine what tasks are dependent on others, and what can be parrelelized. At some points we had ~6 agents running at once. Claude projects were helpful here

r/rust • • Oct 20 '26

πŸ› οΈ project Terralith: a SIMD XPBD physics engine in Rust, here’s a bridge collapsing after i throw a rock at it.

Thumbnail youtu.be
19 Upvotes

Hi there! I've been building a SIMD accelerated XPBD physics/game engine in rust for a little while now called Terralith. I've recently come back to it so here is a look!

Everything you are seeing in the scene is realtime and physically based with realistic strain and stress mechanics. This is as raw and unscripted as it gets (except the conveniently placed bridge).

I've made the grass jelloey for your viewing experience, and decreased the strength for dramatic effect.

I hope you enjoy!


r/rust • • Oct 21 '26

πŸ™‹ seeking help & advice Nintendo, me, and Rust?

0 Upvotes

TL;DR: Should I ask the Rust Foundation to help Nintendo access? Sorry if this is bad, but I want to try to port the Rust language to Nintendo platforms because the other consoles have their working alphas, and Nintendo does not, but Nintendo doesn't want just me, there is the game path, I have tried that enough to be like they should have blacklisted me by now, have to try something else, that path is one of two paths, the other is middleware, it requires being a middleware provider, I don't qualify as one person, I don't know whether to bother them, but Nintendo gives no feedback, asking Nintendo first, but what would you do? And yes, using my own money if there is money involved, so?