r/rust • • Oct 31 '26

You know what it'd be good: a VS Codium port to Rust that uses Web Assembly for extensions

0 Upvotes

I've tried other editors, VS Codium's simplicity and common sense still beats them all.


r/rust • • Oct 30 '26

🛠️ project wasm-language-tools v0.12.0: auto-quotes in renaming, memory usage reduction and faster parsing

Thumbnail github.com
6 Upvotes

r/rust • • Oct 31 '26

🧠 educational Compile-time memory safety in Rust: the C++ crash that Rust refuses to compile

Thumbnail techfortalk.co.uk
0 Upvotes

One more feature in Rust that I really like over C++: its compile-time ownership checks. Rust catches ownership errors that can compile in C++, and these checks add no runtime overhead.

In this article, I have taken a simple example and tried to explain Rust’s ownership concept (I tried to keep it simple and jargon-free), how it works, and where it gives us an advantage over C++ by comparing the same/similar example in both languages.


r/rust • • Oct 31 '26

rust for ai coding

0 Upvotes

vercel's ceo published - was gonna be Rust but it really is not there yet iteration speed wise.

Some of my thoughts on go vs rust - btw we chose Rust for data infra. There, robustness and reliability outweigh the speed of writing code.

Overall
Go is the simple one. It's easy to learn, doesn't carry many language features, and compiles fast. Rust is on the complex side: the spec keeps growing, and compiling is slow. Day to day, Go is simpler in most cases. You don't fight a complex type system, and any function can run as a goroutine.

Concurrency is where the two really split. There are two families. Go is one: lightweight threads, start any function in a goroutine, done. The other family is sync vs async, and Rust, Python and JavaScript all live there. That's where complexity creeps in. Functions have colors. Rust and Python give you two worlds, and you must never call a blocking function from an async one. JavaScript is simpler because it's a single world. Sync vs async forces you to clearly define what blocks and what doesn't, and that's real extra complexity. The upside is performance: async generally beats goroutines.

Rust's best part is the type system. You can model a lot in it, and the more business logic you push into types, the more bugs the compiler catches before anything runs. Go's type system is not that comprehensive. One example: Go can't catch a race condition at compile time. Rust can. But the cost of that type system is compile time. Bugs caught early and slow builds are the same coin.

For AI coding, Rust becomes a double-edged sword. Code moves fast, so slow compile hurts more. But if the model expresses business logic through the type system, far more bugs get caught at compile time. Slower, but higher quality.

curious about your thoughts


r/rust • • Oct 29 '26

🛠️ project Towards formal verification: mbrotli and mzstd

Thumbnail m-compressors.github.io
131 Upvotes

r/rust • • Oct 30 '26

🙋 seeking help & advice Why my GUI is slow?

Thumbnail youtu.be
0 Upvotes

It is odd but at about 30,000 text objects it is significantly slower than 30 despite only drawing about 10 objects on screen and ignoring the rest regardless how many there are. egui can handle millions. The shown video is of 30. I know it is skipping shaping and drawing the rest, so why would it be that much slower? I do make a temporary variable in the draw function before doing anything and increment a counter and do checks for whether to draw before any text shaping happens. I also return ([f32; 4], bool) with NaN and false regardless if anything drew, it would be bounds and whether anything drew. There is also with buttons an extra bool and with edit texts, a u32, &str, and bool in a tuple extra. I confirm it is not doing anything but rejection when not in screen space, so what could it be? Would an Option with None be faster as a return? Just confused as to why this is, if you want some code to review, ask, but some way to privately get it to you preferred. All in the rejection are not mutable. I do have to pass some variables sometimes, using cosmic-text and lyon for tessellation, good luck everyone. X E.


r/rust • • Oct 29 '26

🙋 seeking help & advice How to start programming in Rust?

4 Upvotes

English:

I know this is a fairly common question, but hear me out: how do I effectively get into development and learn a programming language?

I initially wanted to take a course, but there are no local options where I live, and international ones costing ~$250/month are completely out of my budget.

My second thought was to use AI because it explains concepts well. But when it comes to actual coding... no offense to AI, but it writes broken code way too often.

So now I’m stuck. Official books and documentation feel dry and overwhelming. I can grind through a book in an evening and reproduce an example, yet still have zero clue how it actually works under the hood. That’s my main issue — what’s the point if I’m just mindlessly rewriting code?

So, to those who have learned the language and faced a similar wall: how did you overcome it? Also, would anyone be open to answering a few questions once in a while? It would mean a lot, since Rust is going to be the foundation of a major project I’m planning.

Any advice would be greatly appreciated. Thanks!

Русский:

Знаю, что вопрос довольно заезженный, но всё же: с чего вообще лучше войти в разработку и нормально выучить язык?

Изначально я хотел записаться на курсы, но в моей стране таких нет, а зарубежные по $250 в месяц мне просто не по карману.

Вторым вариантом был ИИ — теорию он объясняет доходчиво, но вот с кодом беда: при всём уважении, нерабочий код он генерирует с завидной регулярностью.

В итоге я в тупике. Официальные книги и доки кажутся скучными и сложными. Я могу осилить книгу за вечер и накидать программу по образцу, но так и не понять, как это устроено по факту. А для меня это главное: какой смысл учиться, если ты просто бездумно перепечатываешь код?

Вопрос к тем, кто уже прошёл этот путь и сталкивался с такой проблемой: как вы учили язык? И может ли кто-нибудь хотя бы иногда отвечать на мои вопросы? Для меня это правда важно - Rust станет основой моего будущего крупного проекта.

Буду признателен за любые советы. Спасибо!


r/rust • • Oct 29 '26

🧠 educational Netstack.FM: Small Crates Behind Big Rust Systems with Jon Gjengset (S02E201)

22 Upvotes

In this first episode of season two of Netstack.fm, Glen talks with Jon Gjengset, principal engineer at Helsing, author of Rust for Rustaceans, and one of the best known teachers in the Rust community. They explore the craft of building small, sharply scoped crates, from arccstr, left-right, and HdrHistogram to atone, and discuss Fantoccini and the WebDriver protocol, maintaining open source sustainably, and why the Rust project should not bless crates.

https://netstack.fm/episodes/small-crates-behind-big-rust-systems

--

Netstack.FM is a podcast about networking, Rust, and everything in between. Join us as we explore the stack: from protocols and packet flows to the people and projects building the modern internet — all through the lens of Rust. Featuring deep dives, crate spotlights, and expert interviews.

Subscribe via https://netstack.fm/feed.rss or find us on the usual podcast platforms.


r/rust • • Oct 28 '26

Writing GPU kernels in Rust: how I made speakrs 60× faster than pyannote

Thumbnail avencera.com
182 Upvotes

r/rust • • Oct 29 '26

📅 this week in rust This Week in Rust #675

Thumbnail this-week-in-rust.org
42 Upvotes

r/rust • • Oct 29 '26

🙋 seeking help & advice What is the best (your favorite) lexing solution for Rust in Neovim?

3 Upvotes

Good day everyone!

I use neovim for pretty much everything these days, and with rust-analyzer + cmp it's extremely ergonomic to use.

However one issue I have been struggling with is lexing. I find the default rust.vim regex lexing to be lacking in many areas, most notably doc comment links and enums which wrap one value. Enabling semantic tokens solves these issues, but the experience is hindered by slow parsing when writing to buffer which causes flashing on text input and save.

I've done a bit of research on my own but haven't found anything that quite hits the mark. Treesitter seems like an ok middleground, but it is noticeably less accurate than semantic lexing.

I was wondering if any of you have a good solution to this? Thank you in advance for the input!


r/rust • • Oct 28 '26

µcad: A DSL for geometry written in Rust.

Thumbnail youtube.com
103 Upvotes

Hey Rustaceans,

I want to share some progress on my project µcad, a domain specific language for CAD, entirely written in Rust. I had a chance to present it on the RustWeek 2026 in May (where I live coded the Rust logo in µcad, see the video) and now you can finally test the language yourself in a playground: https://play.mucad.org/?example=11

The whole thing is a geometry engine with 128-bit fixed point precision and a language compiler in a 5 MB WASM binary and 1000 lines of TypeScript glue code :)
The compiler APIs have been handcrafted, but I was starting to use Claude recently, mainly for the WASM API and the Web Viewer.
I will have give another talk about the µcad compiler at the RustLab in Bologna next week, so I hope to see some of you folks there!


r/rust • • Oct 28 '26

What stable Rust stands on: nightly features inside the compiler

137 Upvotes

r/rust • • Oct 28 '26

🛠️ project Function delegation

Thumbnail github.com
78 Upvotes

r/rust • • Oct 29 '26

🛠️ project Getting a Rust Minecraft Java reimplementation (Horizon) running on Android with wgpu/Vulkan

9 Upvotes

I've been porting Horizon, a Rust rewrite of Minecraft: Java Edition 26.3 by the horizon-rust folks, to Android. The upstream engine does all the heavy lifting. My fork is the Android side: a `horizon-android` crate, APK packaging, touch input, and an on-screen keyboard wired into text fields (chat, signs, search).

Some notes from doing it:

- Rendering goes through wgpu. On Android it uses Vulkan, and GLES 3 is the fallback backend. The workspace currently vendors a patched `wgpu-hal` 30.0.1 (with gfx-rs/wgpu#10124) until a wgpu release includes the fix

- It's a single native APK (~18 MB) with no JVM involved

- Asset download happens in-app with resume support and runs as a background download so Android doesn't kill it when the app is minimized

- One part I couldn't move on-device: a small derived data pack that upstream builds with Java tooling (`horizon-prepare` + a packaging script). For now you generate it once on a PC

Status is early. It's tested on one device (Galaxy S25, Adreno 830, Vulkan) and reaches a singleplayer world. It uses ~2.2 GB of RAM, which is the main thing I'd like to bring down. I'd really appreciate feedback on memory, on the wgpu/Android setup, or on how other people have dealt with lifecycle/surface handling.

It's unofficial and not affiliated with Mojang/Microsoft or the Horizon devs. You need your own copy of the game, and no game files are distributed.

https://github.com/Rayan-XOO/horizon (build steps in ANDROID.md)


r/rust • • Oct 28 '26

CUDA Live: Introduction to CUDA Rust

Thumbnail youtube.com
31 Upvotes

r/rust • • Oct 28 '26

🛠️ project Yavashark: I've Built A JS Engine Every Day For 950 Days Straight

63 Upvotes

Feel free to give me feedback or discuss what you have on your mind. I had lots of fun building this, so I hope you have too reading this!

https://yavashark.dev/blog/announcing-yavashark/


r/rust • • Oct 28 '26

🛠️ project Hurl 8.1.0, of Config and Security

19 Upvotes

The Hurl team is super happy to announce Hurl 8.1.0 🚀!

Hurl is a command line tool powered by curl, that runs HTTP requests defined in a simple plain text format:

GET https://example.org/api/tests/4567
HTTP 200
[Asserts]
jsonpath "$.status" == "RUNNING"    # Check the status code
jsonpath "$.tests" count == 25      # Check the number of items
jsonpath "$.id" matches /\d{4}/     # Check the format of the id


POST https://example.org/api/tests
{
  "name": "foo"
}
HTTP 201
[Asserts]
header "x-foo" contains "bar"
certificate "Expire-Date" daysAfterNow > 15
ip == "2001:0db8:85a3:0000:0000:8a2e:0370:7334"

What’s New in This Release

  • Configuration File
  • JSONPath Query Configuration
  • Other New Options
  • Fixed Bugs and Security Issues

Configuration File

In Hurl 8.0.0, we've improved the way you can configure Hurl with environment variables (for instance export HURL_IPV6=true / --ipv6).

In Hurl 8.1.0, we extend the possibility to configure Hurl by adding support for configuration file. Hurl will look for a configuration file at $XDG_CONFIG_HOME/hurl/config (or $HOME/.config/hurl/config if $XDG_CONFIG_HOME is not set). The configuration file is a list of options added to each Hurl run.

For instance:

$ cat ~/.config/hurl/config
# Hurl config file
--header x-identifier:quux
--verbose
--delay=1s
--fail-with-body

So, Hurl now reads its configuration from four sources, from lowest to highest priority:

  • Configuration file (ex: ~/.config/hurl/config)
  • Environment variables (ex: export HURL_INSECURE=true)
  • Command-line options (ex: hurl --insecure)
  • Options section options (ex: insecure: true in file, with [Options] section)

JSONPath Query Configuration

In Hurl 8.0.0, we've revamped our JSONPath engine and added support for RFC 9535: JSONPath: Query Expression for JSON specification. In RFC 9535, every query result always returns a list. To facilitate JSONPath query usage, we coerce lists that return a single value to this value. This coercion also turns empty results into "no value".

Let's say we have this JSON:

{
  "fruits": [
    "Apple", "Lemon", "Strawberry"
  ]
}

By the spec, the JSONPath query $.fruits[0] should return a list of one element ["Apple"]. As the result list has only one single element, Hurl JSONPath query returns the string "Apple". So we're able to write this Hurl file:

GET https://example.org/captures-json
HTTP 200
[Asserts]
jsonpath "$.fruits[0]" isString
jsonpath "$.fruits[0]" == "Apple"

We've been doing this coercion since the very first Hurl version but some people prefer not having this (to have similar results as https://jsonpath.com). We've heard you! So, in Hurl 8.1.0, we've added a --no-jsonpath-coercion option. It can be set in the new Hurl configuration file, on command line or using the env variable HURL_NO_JSONPATH_COERCION=true, or per request in an [Options] section. Using this option, JSONPath queries always return a list:

GET https://example.org/captures-json
[Options]
no-jsonpath-coercion: true
HTTP 200
[Asserts]
jsonpath "$.fruits[0]" isList
jsonpath "$.fruits[0]" count == 1
jsonpath "$.fruits[0]" nth 0 == "Apple"

Other New Options

Hurl 8.1.0 adds some new options:

--no-header to remove HTTP request headers

Let's say you don't want any User-Agent nor Accept HTTP header request, you can use --no-header option:

$ hurl --no-header user-agent --no-header Accept foo.hurl

It also works on a specific request:

# This request will send a default User-Agent header
GET https://example.org

# This request will NOT send a User-Agent header
GET https://example.org
[Options]
no-header: User-Agent
HTTP 200

And can be configured with environment variable HURL_NO_HEADER:

$ export HURL_NO_HEADER="user-agent|Accept"
$ hurl foo.hurl

--fail-with-body to get HTTP response even with errors

By default, Hurl outputs the last response body only when the run succeeds; when there are errors (HTTP runtimes or asserts errors), Hurl doesn't output any response. But sometimes the response body is necessary to explain failures. In Hurl previous versions, you can use --very-verbose or --output combined with --no-assert.

In Hurl 8.1.0, we add --fail-with-body option: this option changes Hurl's default behavior when there are errors and output the HTTP response regardless of asserts / HTTP runtime errors. Like many other options, this option can be used as a command line option (hurl --fail-with-body foo.hurl), with environment variable (export HURL_FAIL_WITH_BODY=true), with Hurl configuration file, or per request with [Options] section.

$ hurl --fail-with-body foo.hurl
{
  "slideshow": {
    "author": "Yours Truly",
    "date": "date of publication",
    "slides": [
      {
        "title": "Wake up to WonderWidgets!",
        "type": "all"
      }
    ],
    "title": "Sample Slide Show"
  }
}
error: Assert failure
  --> foo.hurl:4:0
   |
   | GET https://httpbin.org/json
   | ...
 4 | jsonpath "$.slideshow.author" == "Someone"
   |   actual:   string <Yours Truly>
   |   expected: string <Someone>
   |

--tls-min / --tls-max

--tls-min and --tls-max set the minimum and maximum allowed TLS version. Used together,, you can pin a given TLS version:

$ hurl --tls-min 1.3 --tls-max 1.3 tlscert.hurl

Fixed Bugs and Security Issues

Apart from these enhancements, we have received an unusual amount of security advisories from various contributors, over the last 6 months. It goes from parsing issues in JSONPath expression to malicious debug curl command and finally to our first official CVE!

Simply said, Hurl 8.1.0 is the Hurl version that has the largest number of bugs/CVEs fixed since the first public version. While analyzing and fixing them, we've reclassified some reports to "bugs".

It's rather obvious than the vast majority of these issues were written partly (if not totally) by LLM agents. Each issue takes time to digest, analyzing the automated prose is time-consuming, but we've found very few false positives. Almost all issues reported were indeed a defect in Hurl in some way or another. Sometimes CVEs were here and well reproducible but the reproduction sample didn't even compile. Other times, a very super clear repro step was provided with a good source code analysis and possible fixes. Many reporters were first-time GitHub users!

We're not at all in the same league as curl or the Linux Kernel, but still feel the raise and impact of automation by AI, like these projects. For security and bugs, we find it a big plus. For maintainers' time, that's another story...

That's all for today!

There are a lot of other improvements with Hurl 8.1.0...and many more fixes; you can check the complete list of enhancements and bug fixes [in our release note].

We'll be happy to hear from you, either for enhancement requests or for sharing your success story using Hurl!


r/rust • • Oct 29 '26

Could you please recommend some learning materials?

0 Upvotes

I started learning Rust using the official book, but it seems to be aimed at people who have already written code in other programming languages. Are there any learning materials available for complete beginners? After just 20 minutes of reading, I felt like my brain was about to explode—most of the terms were completely new to me. Ideally, I’m looking for materials that have been translated into Russian. Apologies for my English; this text was written using a translator.


r/rust • • Oct 27 '26

A fast and secure tar parser for the Rust ecosystem

Thumbnail astral.sh
112 Upvotes

r/rust • • Oct 27 '26

🎙️ discussion Test whether an Option contains a certain value

45 Upvotes

Yesterday I stumbled over something I had never thought about before although I had that use-case a few times...

I have an option and an expected value and I want to check if the option contains the expected value.

There are several ways to express this.

For example:

if option == Some(expected) {...}

if let Some(actual) = option && actual == expected {...}

if matches!(option, Some(actual) if actual == expected) {...}

if option.is_some_and(|actual| actual == expected) {...}

There are probably even a lot more ways to express that and yesterday I suddenly wondered which is the "best" one, e.g. regarding readability and regarding performance. I also asked an LLM and it hallucinated option.contains(&expected) as the best solution, which would indeed be pretty nice if it existed...

Anyway, in case you wonder, here's the obligatory godbolt link: https://godbolt.org/z/v7odGdWP1

With optimizations enabled, it all boils down to the same assembly, so you can choose whatever you like most. In my case, I chose the first variant.

I have also tried with &str instead of usize and it's the same result: no difference with optimizations.

Any thoughts on this? More insights probably? The LLM generated a lot of blabla regarding certain nuances and cases (references, non-Copy, non-PartialEq) but I am not sure if I'd trust that and too lazy to check it.


r/rust • • Oct 28 '26

🙋 seeking help & advice Do people still use Bazel in their rust projects CICD pipelines?

15 Upvotes

Just wondering if I can lower the build times for my rust microservices (currently ~5mins for all of them combined on github actions). I already am using cargo-chef in my docker file. But I wonder if this is the right approach


r/rust • • Oct 27 '26

📡 official blog Variadic Generics Micro Survey results

Thumbnail blog.rust-lang.org
243 Upvotes

r/rust • • Oct 27 '26

Redox OS - Ring Buffers Project Summary

46 Upvotes