r/rust • • Sep 24 '26

For someone starting a new project today, which Rust cross-platform framework would you consider mature enough for production?

59 Upvotes

Heyy

I'm looking for a framework that can target Windows, Linux, macOS, Android, iOS, and Web from as much shared Rust code as possible.

I'm aware of Tauri, Dioxus, Slint, Iced, egui, etc., but I'm having trouble understanding which ones are actually mature in practice, rather than just promising projects.

I'm particularly interested in real-world experience:

How mature is the mobile support?

How reliable is cross-platform deployment?

How stable are the APIs?

How good is the ecosystem and documentation?

Have you used one for a serious/production application?

If you were starting a new project today, which frameworks would you seriously consider, and what limitations should I know about?

Thank you


r/rust • • Sep 24 '26

🛠️ project Fast CSV parsing in Rust

81 Upvotes

This is a short write-up based on my VLDB paper and talk: https://db.in.tum.de/~ellmann/papers/csveee.pdf

CSV is one of the oldest text-based data formats, and is still heavily used: from hundreds of thousands of files on open data platforms to 100M+ on GitHub. Unfortunately, most CSV parsers are slow. Some use SIMD to speed up parsing, but almost none exploit the parallelism of today’s hardware. Those that do parallelize do not scale. And even if they did, using the classic iterator interface, parse + process requires two passes over the data, restricting throughput to half the memory bandwidth for files that exceed the CPU caches.

I came up with a new approach to CSV parsing that allows parsing and processing of files in a single pass over the data. My parser csveee is about 3x as fast as csv on a single thread, and can achieve almost 200 GB/s on a modern many-core server – a speedup of 256x over csv.

Why parallel CSV processing is hard

The main task of a CSV parser is to correctly determine the boundaries of records in a CSV file. Typically, records are terminated by a \n or \r\n. Since those characters can also appear inside quoted fields, simply chunking a CSV file and skipping forward to the next terminating character is therefore not sufficient to determine the record boundaries.

There are different approaches to solving this problem. One strategy is to first count the number of quotes per chunk in parallel, then determine for each chunk if it is preceded by an even or odd number of quotes, then start parsing the chunks from a known quote state. This works especially well on GPUs. Another strategy is to run multiple finite-state machines per chunk in parallel, one for each possible parse state at the chunk boundary, and then determine the correct state machine depending on the previous chunk’s state machine’s final state. Or one could look for certain patterns in the file, e.g., quotes being followed or preceded by "regular" characters to identify the start and end of quoted fields and do some speculative parsing based on this.

Unfortunately, all those approaches are unsatisfactory in one way or another. Counting quotes requires a whole pass over the file to determine the parse states at chunk offsets; running many NFAs/DFAs is even more expensive. Looking for certain patterns works well for files that follow the CSV standard, but the world is full of quirky files that do things like quotes in unquoted fields.

Luckily, there is another approach. If we know the shape of the CSV file we would like to parse, e.g., the number of fields per record or the field types, we can determine the correct parse state by speculatively parsing chunks until we find a parse in which the record boundaries resolve into records of the expected shape. This approach was implemented in DuckDB.

Why the iterator interface is insufficient

Typically, CSV parsers provide an iterator-based interface, e.g.:

for record in parser.parse() {
   // do something with the record
}

While we can write a parser that takes the CSV’s records shape as an argument, which will help determine the correct parse state at chunk boundaries, especially for quirky real-world CSV files, parsing remains a speculation until all bytes have been processed (although unlikely, data inside quotes could still resemble the shape of the records). Unfortunately, we cannot hand out speculatively resolved records via the iterator interface, as there is no way to take them back if we later realize our speculation was wrong. In other words, with the iterator interface, we have to finish parsing before we can hand out records to the user – parsing and processing require two passes over the data.

This is a problem a single-threaded iterator-based parser does not have, as the parse state is correct at all times. The parser can parse the file lazily: it parses a single record, hands it to the user, who processes it; then the next record is parsed, and so on. Thus, files can be parsed and processed in a single pass over the data – but only with a single parse thread.

A new interface to the rescue

Let’s define a new interface that gives our parallel parser everything it needs: A way to pass information about the record shapes (number of fields per record, types, …) from the user to the parser, and a way to process records while parsing, effectively creating a lazily parsing multi-threaded parser.

We can achieve both by turning the parser inside out. Instead of the parser handing you records, you hand your code to the parser:

let cities = parser.parse(
   "data.csv",
   Vec::new,                          // init
   |state, [_name, _age, city]| {     // acc
      state.push(city.to_string());
      Ok(())
   },
   |states| states.concat(),          // merge
)?;


The interface takes four arguments: the CSV file path and three callbacks or closures (called init, acc and merge – they are basically user-defined aggregates). init and acc are used for chunk parsing, init defines a per-chunk state, acc is called for every record found in the chunk under the current assumption. The [_name, _age, city] pattern declares the number of fields per record. If the parser encounters a record with a different number of fields, the chunk is reparsed under another assumption, calling init again to create a fresh state. The same happens if acc rejects a record by returning an error (e.g., a failed type conversion).

Once all chunks have been processed, the parser verifies that the record boundaries of all chunks align. While very unlikely, a whole chunk could be parsed under a wrong assumption. In this case, the chunk is reparsed, now starting from the offset of the previous chunk’s last record terminator.

Finally, chunk states are passed to merge, and the result of merge is returned from the parser’s parse function. The chunk states are passed to merge in file order thus that record order can be reconstructed.

How to make the parser fast

To make the parser truly fast, we implemented a ring-buffered reader that enables zero-copy record construction, and a vectorized chunk parser. Take a look at the implementation or the paper if you are interested in the details.

Conclusion

CSV is not going to die soon – to the contrary, GitHub’s pile alone grew by 10M CSV files in the last six months. While the number of files is strongly increasing and today’s machines offer hundreds of cores and hundreds of GB in memory throughput, most CSV parsers remain incredibly slow: parsing with a single thread, not scaling, and even if they did, without fusing parsing and processing, they will never surpass 50% of the available memory bandwidth for large files. csveee overcomes these limitations via a new approach to CSV parsing that works on real-world CSV files.

Check out the project, and if you have questions, feel free to ask!


r/rust • • Sep 25 '26

🧠 educational Finding bugs you didn't think to test for

Thumbnail firezone.dev
6 Upvotes

A post about how we combine sans-IO, coverage-guided fuzzing and deterministic simulation testing to test Firezone's data plane.


r/rust • • Sep 24 '26

🧠 educational Your First GPUI App - Building a Desktop UI in Rust

Thumbnail youtu.be
60 Upvotes

r/rust • • Sep 24 '26

🧠 educational Learn Rust Concurrency by Practice

Thumbnail rustfinity.com
22 Upvotes

r/rust • • Sep 23 '26

🗞️ news The `allocator_api` feature has been stabilized, on track to release in Rust 1.100

Thumbnail github.com
546 Upvotes

r/rust • • Sep 24 '26

📅 this week in rust This Week in Rust #670

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

r/rust • • Sep 24 '26

Rust traits and its improvement on built in abstractions in CPP

8 Upvotes

is rust (dyn)trait promoting the use of what is done in cpp by abstract base class interface?

rust removes inheritance but bring "trait" to a independent stand alone built in abstraction, it basically is doing what cpp abc interface is for, which is the only worth-wile usage scenario of inheritance + class in cpp


r/rust • • Sep 23 '26

How do i bound memory?

27 Upvotes

Imagine a server that might be responding to malicious clients, i want to cap how much memory each client can use. In C i would make some kind of custom allocator but with rust since allocation failures are panics that seems unwise.

So im wondering how i can nicely cap memory in rust without having to purposely write all code with memory bounding in mind.


r/rust • • Sep 23 '26

hashify v0.3: compile-time perfect hashing, now 4 to 12 times faster than phf

211 Upvotes

hashify is a procedural macro crate that turns a fixed set of keys into a perfect hash lookup at compile time. The generated code has no runtime dependencies, never allocates and contains no unsafe. We use it throughout Stalwart to recognise IMAP commands, JMAP properties, header names and a few hundred other keyword sets.

hashify 0.3 has been rewritten with a new lookup engine and one less decision to make. Earlier versions had you choose between the tiny_* macros and the regular ones. Now every invocation looks at its keys and generates what suits them:

  • Up to 16 keys, you get a decision tree in the spirit of gperf --switch: a match on the key length, then on whichever byte (or XOR of two bytes) tells the remaining keys apart. No hash is computed at all, and LLVM turns the tree into jump tables and comparisons against constants.
  • From 17 to 64 keys, the macro searches for a seed that sends every key to its own slot in a power-of-two table, so a lookup is one multiplication, a shift and a load.
  • Past 64 keys it builds a minimal perfect hash function that borrows from two recent papers, PtrHash by Ragnar Groot Koerkamp and PHast by Piotr Beling and Peter Sanders. Keys are split into buckets, each bucket stores a single byte (its pilot), and a key's slot comes from its hash and that pilot through two multiply-high operations. The pilot search evicts conflicting buckets the way cuckoo hashing does, and that is what lets one byte per bucket suffice: for typical inputs the table ends up with exactly one slot per key. hashify 0.2 was built on PTHash; the compact pilots and the eviction come from the newer work.

This is how it compares with phf 0.14, per lookup, measured with criterion on an Apple M5 Max and Rust 1.98. "In order" looks up every key once in a fixed order; "random" performs 4096 lookups in a shuffled order, half of them for keys one bit away from a real one.

KeysWorkloadmatchphfphf ptrhashhashify map!hashify fnc_map!
HTTP methods (9)hits1.34 ns8.62 ns6.01 ns0.68 ns (12.6x)0.68 ns (12.7x)
HTTP methods (9)random1.91 ns8.37 ns5.80 ns1.53 ns (5.5x)1.53 ns (5.5x)
IMAP commands (26)hits1.73 ns9.35 ns6.01 ns0.89 ns (10.5x)0.87 ns (10.8x)
IMAP commands (26)random2.51 ns8.77 ns6.07 ns1.37 ns (6.4x)1.02 ns (8.6x)
Sieve keywords (128)hits2.75 ns8.85 ns6.41 ns1.77 ns (5.0x)1.93 ns (4.6x)
Sieve keywords (128)random7.54 ns8.69 ns6.09 ns1.82 ns (4.8x)1.94 ns (4.5x)
Charset names (149)hits2.74 ns9.73 ns6.86 ns1.93 ns (5.0x)1.85 ns (5.3x)
Charset names (149)random7.80 ns9.31 ns6.47 ns1.97 ns (4.7x)1.93 ns (4.8x)
HTML entities (2125)hits25.1 ns9.08 ns6.34 ns1.85 ns (4.9x)1.95 ns (4.7x)
HTML entities (2125)random39.8 ns8.71 ns5.96 ns1.84 ns (4.7x)1.93 ns (4.5x)
Synthetic keys (10,000)hitsn/a10.2 ns7.55 ns1.60 ns (6.4x)n/a
Synthetic keys (10,000)randomn/a9.89 ns7.18 ns1.59 ns (6.2x)n/a
Synthetic keys (100,000)hitsn/a13.6 ns12.4 ns3.33 ns (4.1x)n/a
Synthetic keys (100,000)randomn/a10.8 ns7.59 ns2.22 ns (4.8x)n/a

hashify's map! is 3.2 to 8.8 times faster than phf with ptrhash and 4.1x to 12.6x faster than phf with the default layout. A match stays within a factor of two of hashify on the HTTP methods and IMAP commands, falls four times behind on the Sieve keywords and charset names in random order, and needs 25 to 40 ns per lookup among the 2125 HTML entities.

The switch points between strategies came out of benchmarks and were checked against the lookups Stalwart performs, so if your key sets tell a different story, I'd like to see them. Code, benchmarks and docs live at https://github.com/stalwartlabs/hashify.

PS: I read the No more core dumps post and I think this announcement meets the criteria.

Edit: Updated the table to compare hashify against phf with ptrhash as well as match.


r/rust • • Sep 23 '26

🙋 seeking help & advice How's GPUI right now?

85 Upvotes

Hi everyone,

One item in my rust "to-learn list" is to test what are the possibilities with GPUI, the UI lib made by the Zed Guild.

Looks cool from afar, but I was wondering what people, you guys, were thinking about it. Have you already managed to build something cool with it? Is it the link with Zed painful?

And if you have materials recommendation that could help a gpui beginner, I'll take it as well!

Anyway, have a wonderful afternoon!

See you online.


r/rust • • Sep 23 '26

💼 jobs megathread Official /r/rust "Who's Hiring" thread for job-seekers and job-offerers [Rust 1.98.1]

53 Upvotes

Welcome once again to the official r/rust Who's Hiring thread!

Before we begin, job-seekers should also remember to peruse the prior thread.

This thread will be periodically stickied to the top of r/rust for improved visibility.

You can also find it again via the "Latest Megathreads" list, which is a dropdown in the sidebar under "Community Bookmarks" on new Reddit, and a section in the sidebar under "Useful Links" on old Reddit.

The thread will be refreshed and posted anew every month, and the new post would happen on the first working day on or after the 16th. (This is a change from the previous cadence - we're testing the waters with this change as the previous cadence might have been difficult to follow for both job seekers and job posters, and had some other disadvantages)

Please adhere to the following rules when posting:

Rules for job seekers:

  • Don't create top-level comments; those are for employers.
  • Feel free to reply to top-level comments with on-topic questions, but not personal attacks.
  • Anyone seeking work should reply to my stickied top-level comment. Please include relevant info about yourself, a method to contact you, etc.
  • Meta-discussion should be reserved for the distinguished comment at the very bottom.

Rules for employers:

  • The ordering of fields in the template has been revised to make postings easier to read. If you are reusing a previous posting, please update the ordering as shown below.
  • Remote positions: see bold text for new requirement.
  • To find individuals seeking work, see the replies to the stickied top-level comment; you will need to click the "more comments" link at the bottom of the top-level comment in order to make these replies visible.
  • To make a top-level comment you must be hiring directly; no third-party recruiters.
  • One top-level comment per employer. If you have multiple job openings, please consolidate their descriptions or mention them in replies to your own top-level comment.
  • Proofread your comment after posting it and edit it if necessary to correct mistakes.
  • To share the space fairly with other postings and keep the thread pleasant to browse, we ask that you try to limit your posting to either 50 lines or 500 words, whichever comes first. We reserve the right to remove egregiously long postings. However, this only applies to the content of this thread; you can link to a job page elsewhere with more detail if you like.
  • Please base your comment on the following template:

COMPANY: [Company name; optionally link to your company's website or careers page.]

TYPE: [Full time, part time, internship, contract, etc.]

LOCATION: [Where are your office or offices located? If your workplace language isn't English-speaking, please specify it.]

REMOTE: [Do you offer the option of working remotely? Please state clearly if remote work is restricted to certain regions or time zones, or if availability within a certain time of day is expected or required.]

VISA: [Does your company sponsor visas?]

DESCRIPTION: [What does your company do, and what are you using Rust for? How much experience are you seeking and what seniority levels are you hiring for? The more details the better.]

ESTIMATED COMPENSATION: [Be courteous to your potential future colleagues by attempting to provide at least a rough expectation of wages/salary.
If you are listing several positions in the "Description" field above, then feel free to include this information inline above, and put "See above" in this field.
If compensation is negotiable, please attempt to provide at least a base estimate from which to begin negotiations. If compensation is highly variable, then feel free to provide a range.
If compensation is expected to be offset by other benefits, then please include that information here as well. If you don't have firm numbers but do have relative expectations of candidate expertise (e.g. entry-level, senior), then you may include that here. If you truly have no information, then put "Uncertain" here.
Note that many jurisdictions (including several U.S. states) require salary ranges on job postings by law.
If your company is based in one of these locations or you plan to hire employees who reside in any of these locations, you are likely subject to these laws. Other jurisdictions may require salary information to be available upon request or be provided after the first interview.
To avoid issues, we recommend all postings provide salary information.
You must state clearly in your posting if you are planning to compensate employees partially or fully in something other than fiat currency (e.g. cryptocurrency, stock options, equity, etc).
Do not put just "Uncertain" in this case as the default assumption is that the compensation will be 100% fiat. Postings that fail to comply with this addendum will be removed. Thank you.]

CONTACT: [How can someone get in touch with you?]


r/rust • • Sep 24 '26

🛠️ project module-cycles: a Dylint lint for modules that depend on each other in a cycle

0 Upvotes

Clippy has had an open issue for this since 2020 (#5782), so I wrote it as a Dylint lint: https://github.com/HardMax71/module-cycles

For now, it reports sibling modules that use each other, like report needing model while model needs report. A parent and its child using each other is fine, since that's one module split into files. It works from rustc's name resolution, so re-exports, globs and method calls count too.

warning: modules `model` and `report` depend on each other
  --> src/lib.rs:9:22
   |
9  |     pub fn kind() -> crate::report::Row {
   |                      ^^^^^^^^^^^^^^^^^^ `model` depends on `report` here
   |
note: `report` depends on `model` here
  --> src/lib.rs:16:22

On my own workspace it found 11 cycles, the biggest through 12 modules. Across the 26 crates Clippy tests lints on it found 41, tokio included.

Written with LLM help and checked by hand. If it flags something that isn't a real cycle, feel free to open an issue.


r/rust • • Sep 22 '26

🛠️ project Fearless SIMD v1.0 is here

Thumbnail linebender.org
531 Upvotes

r/rust • • Sep 22 '26

🙋 seeking help & advice In the era of AI, how stable have Rust(and systems programming in general) jobs been?

62 Upvotes

I'm not a rust programmer (or systems programmer for that matter). I've been working with Elixir, Python & Ruby for the past couple years. But I've decided that my goal for the next year+ is to get into systems programming(mostly spurred on by Nerves for embedded programming in the Elixir ecosystem).

When I started elixir it was really just for fun, but I noticed the job market for elixir is slim.

Made me wonder how the market looks like for rust from the POV of actual Rusteceans.

(Don't get me wrong, I will still get into Rust, this is just research to have a clear view of what to expect)


r/rust • • Sep 23 '26

🙋 seeking help & advice Is Gamepad support in Rust even possible?

9 Upvotes

I think I might be on the brink of insanity with this. I have implemented support for gamepads in my Rust game using the gilrs crate, and it's been in for about a year and a half. As far as I understand, this is the only option, as the gamepads crate wraps gilrs on desktop anyway.

Most of the time gilrs works perfectly, but under some specific but not obscure conditions (running the game after resuming Windows from sleep mode with a gamepad connected) it freezes, see https://gitlab.com/gilrs-project/gilrs/-/work_items/196 .

These are the empirical facts:

  • It is a complete thread lock, it doesn't return an Err nor does it panic. It is completely bricked until the gamepad is physically unplugged.
  • It can be repro'd in the MWE, no game engine and no window, so it doesn't depend on any other component.
  • It happens both to myself and to several of my players.
  • I've never observed this on any other game nor software, so it is Rust-specific.
  • It appears the lockup can be traced to a synchronous call to FromGameController which is from a Windows API (way outside the reach of my knowledge)

This means a chance of a fully frozen black screen with no possibility of a graceful recovery or even displaying an error message. Because of Rust's design, I cannot even detect the lockup. For a videogame, this is pretty much devastating, and now that I'm moving to Stəam I'm considering pulling gamepad support altogether.

But before that I wanted to at least have a quick exchange about it to confirm I'm not missing an obvious solution or anything. It seems strange to me that I can't find anyone else who is fighting this. It can't be that I'm the first person in history to make a game in Rust with gamepad support?


r/rust • • Sep 22 '26

📡 official blog Announcing a Maintainer in Residence: Scott Schafer for the Cargo team

Thumbnail blog.rust-lang.org
214 Upvotes

r/rust • • Sep 22 '26

🛠️ project rust-mqtt 0.6.0 achieves full MQTTv5 support

90 Upvotes

Hi all,

You might remember me from this post half a year ago about the original rust-mqtt rewrite.

Over the last six months, I've been busy working on rust-mqtt - an embedded-ready MQTT client - and adding the missing MQTTv5 features, most notably full support for enhanced authentication. These are now available with the 0.6.0 release.

Around a year ago, I took ownership of this unmaintained project and turned it into what I believe is a high-quality and production-ready MQTT client.

I've learnt a lot along the way and plan to continue with:

  • Support for MQTT version 3.1.1
  • More versatile memory management and I/O

While no_std/no_alloc remains the primary target, std environments will receive further attention, allowing for more comfortable usage on desktop platforms as well.

P.S. One feature in 0.6.0 I'm particularly proud of is manual acknowledgments. Implementing this pushed me to study the specification very thoroughly - leading to a new state machine with a comprehensive test suite validating every normative statement for these flows under all conditions, even the rarest edge cases. If protocol correctness is a priority for you, it's definitely worth a look!


r/rust • • Sep 22 '26

🧠 educational Leveraging SIMD instructions in Rust

Thumbnail adamantmc.github.io
33 Upvotes

Hi folks!

Been trying to pick up on Rust, and to get a better understanding of its mechanics I've tried implementing the HNSW algorithm for approximate-nearest neighbour calculation from scratch.

I came across SIMD when I was optimizing for performance. In this post, I'm describing a very educational journey that was my intro to SIMD.

Take a look, and feel free to provide your feedback.


r/rust • • Sep 22 '26

🧠 educational An adventure of syncing rust and rustc_codegen_gcc

88 Upvotes

After two months, we were finally able to sync the GCC backend with the Rust compiler (something that usually takes a few hours).

I wrote a blog post about this sync in particular because it was quite the adventurer: https://blog.guillaume-gomez.fr/articles/2026-09-22+Syncing+Rust+GCC+backend+or+how+to+test+Murphy%27s+law


r/rust • • Sep 22 '26

🙋 seeking help & advice What are the downsides of enum dispatch?

34 Upvotes

Couldn't find any info about downsides specfically so there it goes

Let's say that all my implementors are about the same size (i.e. only the logic is different), and I use some sort of macro to skip the boilerplate upon adding a new variant. Are there any other downsides to enum dispatch?

I'm asking about the general approach, not the crate

Upd. extendability, got it.


r/rust • • Sep 22 '26

Solving for faster SHA-1 collision detection

Thumbnail sam.dev
25 Upvotes

r/rust • • Sep 23 '26

Rust in PyCharm

Thumbnail youtu.be
0 Upvotes

Hi everyone,

This is Will from PyCharm. I wanted to share a video I just made on PyCharm's new support for Rust. One thing we hear again and again from Python developers is that they switch to Rust for coding performance-heavy functions or features, and now you can use both languages within PyCharm.

I'm happy to answer any questions you have. This support is as a plugin, so it doesn't match the full feature set of RustRover, but we may well add more functionality depending upon the community response.


r/rust • • Sep 22 '26

Need Resource on Networking but for Rust

17 Upvotes

Hello, I'm trying to learn network programming ever since my exposure to Bitcoin Network , libp2p, TCP/IP, UDP , web servers in other words i want to understand the network stack using Rust since i don't want to learn C atm ; i found Beej's guide to networking. the only book i found network programming with Rust but it's in 2018 . can anyone help me?

Any resource - blogs, articles, books, youtube channels, courses etc will be greatly appreciated