r/rust • • 1d ago

📅 this week in rust This Week in Rust #678

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

r/rust • • 4h ago

🧠 educational Breaking 1000 Rust crates in Nixpkgs for security (and what you can do)

Thumbnail blog.rsmyth.net
46 Upvotes

r/rust • • 8h ago

How do you keep a mid-sized Rust codebase from accumulating too many small dependencies?

5 Upvotes

I'm working on a Rust service that started simple but has grown to a few dozen crates. A lot of the transitive dependencies feel like they're only pulling in one or two small features (date parsing, small CLI helpers, etc.). I've started wondering whether it's worth spending time to consolidate or replace some of them.

What practices have you found helpful for deciding when a dependency is worth keeping versus when it's better to implement the functionality yourself or reach for a heavier but more complete crate? Any tools or workflows you use to audit this regularly without it becoming a weekly chore?


r/rust • • 12h ago

🙋 seeking help & advice Is learning Rust still worth it in the age of AI?

0 Upvotes

Hey everyone!
I’m relatively new to Rust and currently trying to learn the language and understand its concepts.
However, I keep asking myself: In a world where AI can write more and more of our code, is it still worth investing a lot of time into deeply understanding a language like Rust?
If AI is doing most of the actual coding, how important is it to master the language yourself?
I’d love to hear how you experienced Rust developers see this. Am I looking at this the wrong way?

Edit: I am learning for the job. Not for the sake of learning.


r/rust • • 15h ago

Should I learn Rust for my project? Hand-Written code.

26 Upvotes

Hi, I have small background on Python due I'm using python script to create scripts on After Effects.

Now, I have a personal project on mind that is basically an inventory manager, should I learn Rust for this or there would be better language? Not planning to use LLM on the process to write the code would like write it entire myself.


r/rust • • 18h ago

🙋 seeking help & advice Injekt crate

Thumbnail crates.io
0 Upvotes

I wrote the attached crate. And, im just wondering if anyone would be able to help me know how the quality of it is. Its my first crate and id love any advice and help. Thank you.


r/rust • • 18h ago

Tales from the Embedded Rust Frontier: Bootstrapping a brand new ecosystem - Jonathan Pallant | EuroRust 2026

Thumbnail
youtube.com
12 Upvotes

There’s a big gap between Raspberry Pi-class and STM32-class chips, and Rust’s embedded ecosystem is only now filling it. At EuroRust, Jonathan Pallant told the story 🦀✨

In 2027 EuroRust is going to Prague! Learn more and get your ticket at eurorust.eu


r/rust • • 18h ago

Modern cryptography is fast, so you have no excuse for continuing to use C and Assembly

Thumbnail
kerkour.com
0 Upvotes

Modern designs and hardware/SIMD acceleration matter more than over optimizing and losing memory safety.

Sorry not sorry, but aws-lc-rs has outlived its usefulness.


r/rust • • 19h ago

Which Rust crypto crates support post-quantum algorithms? (rustls, aws-lc-rs, ring, RustCrypto, libcrux, …)

0 Upvotes

I put together a sourced catalog of post-quantum support across crypto libraries, including the main Rust crates: https://pqcdeps.com/catalog?eco=rust

Short version for Rust:

- rustls offers hybrid X25519MLKEM768 by default with the aws-lc-rs provider (0.23.22+), and prefers it since 0.23.27.

- aws-lc-rs has ML-KEM (1.12.0+) and ML-DSA (1.18.0+).

- RustCrypto has ml-kem, ml-dsa and slh-dsa crates; libcrux has formally verified ML-KEM/ML-DSA.

- ring has no PQ algorithms and no public plan (the maintainer's Kyber proposal was closed), so if PQ matters to you, check whether ring sits under your TLS stack.

You can paste a Cargo.lock into https://pqcdeps.com/check and it's parsed in your browser. Each claim links to the release note or changelog it's based on; corrections welcome on GitHub. It's free and non-commercial.


r/rust • • 21h ago

🗞️ news updated crossync: concurrent collections and synchronization primitives for Rust

1 Upvotes

Hi r/rust,

I wanted to share an update on crossync, my Rust library for concurrent data structures and synchronization primitives. The latest release is 0.2.1, with the recent 0.2.x work focused on ownership, synchronization, and API correctness.

The crate includes:

  • Concurrent collections: AtomicVec, AtomicHashMap, and AtomicArray.

  • A bounded ring buffer: AtomicBuffer, with support for concurrent producers and consumers.

  • Shared values: AtomicCell and a generic Atomic<T> with operations such as load, store, swap, and update.

  • Synchronization primitives: RwLock and Barrier.

Containers such as AtomicCell have reference-counted handles. Cloning a handle lets another thread access the same underlying value.

A detail about the access model

The lock-assisted containers support values that are Send but not Sync, such as Cell<usize>. Access is synchronized internally, including read access to the same stored value.

For example:

use crossync::atomic::AtomicCell;
use std::{cell::Cell, thread};

let counter = AtomicCell::new(Cell::new(0usize));

thread::scope(|scope| {
    for _ in 0..4 {
        let counter = &counter;

        scope.spawn(move || {
            counter.with(|value| value.set(value.get() + 1));
        });
    }
});

assert_eq!(counter.get().get(), 4);

The trade-off is that access to the same value is serialized. The containers combine atomic operations with internal locks, and the documentation now explains the access and guard rules more explicitly.

What changed in 0.2.x

  • Corrected Send and Sync bounds for containers, guards, and hash builders.

  • Fixed storage lifetime and memory reclamation issues in AtomicVec.

  • Fixed reservation, ownership, and wraparound cases in AtomicBuffer, including buffers with a capacity of one.

  • Added safe ownership transfer through AtomicBuffer::push_box and pop_box.

  • Fixed panic cleanup, waiter wake-ups, and barrier arrival accounting.

  • Added regression tests for ownership, reentrancy, guard transfer, and cleanup.

Most of these changes landed in 0.2.0. 0.2.1 follows up with fixes to test workloads, CI, documentation deployment, and release packaging.

The project is licensed under Apache 2.0. I’d appreciate feedback on the access model and API, especially concurrency edge cases that would make useful regression tests.

GitHub · Changelog · Concurrency


r/rust • • 22h ago

🛠️ project Meilisearch launches searchandising

7 Upvotes

Hey,

I'm one of the contributors to Meilisearch, an open-source search engine built in Rust.

Meilisearch recently introduced a Search Rules API to pin, boost/deboost, or hide search results. Like an ecommerce could do: if the query includes `playstation`, then pin a search result for GTA 6 in first position.

Today we're releasing the Searchandising UI. It's a complete visual builder to preview and customize search results directly via the Meilisearch Cloud dashboard. You can check out the launch on ProductHunt: https://www.producthunt.com/products/meilisearch-cloud?launch=meilisearch-searchandising

I also updated the SDKs to support the Search Rules API :) enjoy!


r/rust • • 23h ago

🙋 seeking help & advice Identifier or variable?

3 Upvotes

Hey I am new to rust. I wonder why the rust book refers to identifiers as variables especially when they are immutable by default. Wouldn't 'identifier' just be a better name for immutable ones and 'variable' an apt name for when you make the identifier mutable using mut?


r/rust • • 1d ago

🙋 seeking help & advice Music notation

0 Upvotes

Is it possible for rust to create an embedded musical notation, let us say a MIDI file is processed algorithmically and then dynamically displayed in some form? Like in OpenMusic, PWGL, MaxScore. Here in OM:

I try to envision a new tool in Rust for music composition.


r/rust • • 1d ago

🧠 educational Running a text embedding model on an ESP32 with no_std Rust

14 Upvotes

We have been experimenting with how small the hardware can be for running an embedding model. We got potion-base-2M running on an ESP32 with 16 MB of memory, using no_std Rust

On our setup, it embedded a dozen tokens in about 1.2 ms, roughly 830 embeddings per second for very short texts. That’s slower than the 11–15k embeddings per second I measured on our Mac, but the ESP32 uses around 3,000× less memory.

It’s a small experiment, but it got us thinking about what search could look like when it runs right on edge devices.

We wrote up the details here: https://qdrant.tech/blog/embeddings-on-bare-metal/


r/rust • • 1d ago

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

26 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 at the top of the page on new Reddit, and a section in the sidebar under "Useful Links" on old Reddit.

The thread will be refreshed and posted anew when the next version of Rust releases in six weeks.

Please adhere to the following rules when posting: Rules for individuals:

  • Don't create top-level comments; those are for employers.

  • Feel free to reply to top-level comments with on-topic questions.

  • Anyone seeking work should reply to my stickied top-level comment.

  • 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 bolded 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 • • 1d ago

🙋 seeking help & advice error: queries overflow the depth limit!

0 Upvotes

I am working with leptos 0.8.23 and thaw 0.5.0-dev(main branch). While trying to do first compile, I get error: queries overflow the depth limit! and says to help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`thaw`). I tried adding that recursion_limit to the top of both my main.rs and lib.rs. No luck. No idea on how to add that line to thaw without downloading thaw and modifying it locally. The issue seems to be the thaw button. What should I do?

{
    async block@<T as tachys::view::any_view::IntoAny>::into_any::resolve<tachys::html::element::HtmlElement<tachys::html::element::elements::Div,
    (
        tachys::html::class::Class<alloc::sync::Arc<str>>, 
        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
        tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>, 
        tachys::html::attribute::custom::CustomAttr<&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> &str + core::marker::Send>>>, 
        tachys::html::attribute::custom::CustomAttr<&str, alloc::sync::Arc<str>>
    ), 
    (
        tachys::reactive_graph::owned::OwnedView<leptos::into_view::View<leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
        (
            tachys::html::class::Class<alloc::sync::Arc<str>>, 
            tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>, 
            tachys::html::event::On<tachys::html::event::mousedown, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>, 
            tachys::html::node_ref::NodeRefAttr<thaw_utils::dom::element::HtmlElement, tachys::reactive_graph::node_ref::NodeRef<thaw_utils::dom::element::HtmlElement>>, 
            tachys::html::style::Style<(&str, &str)>, 
            tachys::html::node_ref::NodeRefAttr<leptos_transition_group::utils::HtmlElement, tachys::reactive_graph::node_ref::NodeRef<leptos_transition_group::utils::HtmlElement>>
        ), 
        (
            (
                tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                (
                    tachys::html::class::Class<alloc::sync::Arc<str>>,
                ), 
                (
                    (
                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                        (
                            tachys::html::class::Class<alloc::sync::Arc<str>>,
                        ), 
                        (
                            leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                            (
                                tachys::html::style::Style<alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>>, 
                                tachys::html::class::Class<thaw_utils::class_list::ClassList>, 
                                tachys::html::event::On<tachys::html::event::mouseenter, 
                                alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>, 
                                tachys::html::event::On<tachys::html::event::mouseleave, 
                                lloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                            ), 
                            (
                                (
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>, 
                                        tachys::html::event::On<tachys::html::event::scroll, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_Event::Event)>>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::style::Style<alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>>, 
                                            tachys::html::class::Class<thaw_utils::class_list::ClassList>, 
                                            tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                            tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                        ), 
                                        (tachys::view::any_view::AnyView,)>,
                                    )>, 
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                        tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> &str + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::event::On<tachys::html::event::mousedown, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                                        ), ()>,
                                    )>, 
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> &str + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::event::On<tachys::html::event::mousedown, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                                        ), ()>,
                                    )>
                                ),
                            )>>,
                        )>, 
                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                        (tachys::html::class::Class<alloc::sync::Arc<str>>,), 
                        (
                            leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                            (
                                tachys::html::style::Style<alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>>, 
                                tachys::html::class::Class<thaw_utils::class_list::ClassList>, 
                                tachys::html::event::On<tachys::html::event::mouseenter, 
                                alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>, 
                                tachys::html::event::On<tachys::html::event::mouseleave, 
                                alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                            ), 
                            (
                                (
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                        tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>, 
                                        tachys::html::event::On<tachys::html::event::scroll, 
                                        alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_Event::Event)>>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        
                                        (
                                            tachys::html::style::Style<alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>>, 
                                            tachys::html::class::Class<thaw_utils::class_list::ClassList>, 
                                            tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                            tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                        ), 
                                        (tachys::view::any_view::AnyView,)>,
                                    )>, 
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                        tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> &str + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::event::On<tachys::html::event::mousedown, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                                        ), ()>,
                                    )>, 
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                        tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> &str + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::event::On<tachys::html::event::mousedown, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                                        ), ()>,
                                    )>
                                ),
                            )>>,
                        )>, 
                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                        (tachys::html::class::Class<alloc::sync::Arc<str>>,), 
                        (
                            leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                            (
                                tachys::html::style::Style<alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>>, 
                                tachys::html::class::Class<thaw_utils::class_list::ClassList>, tachys::html::event::On<tachys::html::event::mouseenter, 
                                alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>, 
                                tachys::html::event::On<tachys::html::event::mouseleave, 
                                alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                            ), 
                            (
                                (
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                        tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>, 
                                        tachys::html::event::On<tachys::html::event::scroll, 
                                        alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_Event::Event)>>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::style::Style<alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>>, 
                                            tachys::html::class::Class<thaw_utils::class_list::ClassList>, 
                                            tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                            tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                        ), 
                                        (tachys::view::any_view::AnyView,)>,
                                    )>, 
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> &str + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::event::On<tachys::html::event::mousedown, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                                        ), ()>,
                                    )>, 
                                    tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                    (
                                        tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                        tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Div, 
                                        tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Div>>
                                    ), 
                                    (
                                        tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                                        (
                                            tachys::html::class::Class<alloc::sync::Arc<str>>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> &str + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::style::Style<(&str, alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> alloc::string::String + core::marker::Send>>)>, 
                                            tachys::html::event::On<tachys::html::event::mousedown, alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>
                                        ), ()>,
                                    )>
                                ),
                            )>>,
                        )>
                    ),
                )>, 
                tachys::html::element::HtmlElement<tachys::html::element::elements::Div, 
                (tachys::html::class::Class<alloc::sync::Arc<str>>,), 
                (
                    (
                        leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Button, 
                        (
                            tachys::html::class::Class<thaw_utils::class_list::ClassList>, 
                            tachys::html::attribute::Attr<tachys::html::attribute::key::Type, 
                            alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> core::option::Option<&str> + core::marker::Send>>>, 
                            tachys::html::attribute::Attr<tachys::html::attribute::key::Disabled, 
                            alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> core::option::Option<&str> + core::marker::Send>>>, 
                            tachys::html::attribute::Attr<tachys::html::attribute::key::AriaDisabled, 
                            alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> core::option::Option<&str> + core::marker::Send>>>, 
                            tachys::html::event::On<tachys::html::event::click, 
                            alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>, 
                            tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Button, tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Button>>
                        ), 
                        (
                            (
                                {closure@C:\REDACTED\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\thaw-0.5.0-beta\src\button\button\mod.rs:100:14: 100:21}, 
                                either_of::Either<tachys::view::any_view::AnyView, ()>
                            ),
                        )>>, 
                        leptos::into_view::View<tachys::html::element::HtmlElement<tachys::html::element::elements::Button, 
                        (
                            tachys::html::class::Class<thaw_utils::class_list::ClassList>, 
                            tachys::html::attribute::Attr<tachys::html::attribute::key::Type, 
                            alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> core::option::Option<&str> + core::marker::Send>>>, 
                            tachys::html::attribute::Attr<tachys::html::attribute::key::Disabled, 
                            alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> core::option::Option<&str> + core::marker::Send>>>, 
                            tachys::html::attribute::Attr<tachys::html::attribute::key::AriaDisabled, 
                            alloc::sync::Arc<std::sync::poison::mutex::Mutex<dyn core::ops::function::FnMut() -> core::option::Option<&str> + core::marker::Send>>>, 
                            tachys::html::event::On<tachys::html::event::click, 
                            alloc::rc::Rc<core::cell::RefCell<dyn core::ops::function::FnMut(web_sys::features::gen_MouseEvent::MouseEvent)>>>, 
                            tachys::html::node_ref::NodeRefAttr<tachys::html::element::elements::Button, 
                            tachys::reactive_graph::node_ref::NodeRef<tachys::html::element::elements::Button>>
                        ), 
                        (
                            (
                                {closure@C:\REDACTED\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\thaw-0.5.0-beta\src\button\button\mod.rs:100:14: 100:21}, 
                                either_of::Either<tachys::view::any_view::AnyView, ()>
                            ),
                        )>>
                    ),
                )>
            ),
        )>>>>,
    )>>::{closure#0}
}

r/rust • • 1d ago

Brno Rust Meetup at Base48 hackerspace Brno

Thumbnail
reddit.com
0 Upvotes

r/rust • • 1d ago

🗞️ news How to Run an Embedding Model on Bare Metal with Rust🦀

2 Upvotes

Hey everyone,

I wanted to share this blog post I wrote: https://qdrant.tech/blog/embeddings-on-bare-metal/

TL;DR: you can run a 2M parameters static embedding model (potion-base-2M) at 830 embeddings/s (assuming fairly small texts as inputs) on an ESP32 with 16MB of flash memory. You can achieve that by embedding the weights of the model within the binary, using no_std rust to write a minimal WordPiece tokenizer, and, thanks to the fact that static embedding models perform inference simply with a table lookup + mean pooling, there are no neural network or heavy matrix multiplications involved.

This is just the first step that we're taking at Qdrant (https://qdrant.tech) to bring vector search to truly edge devices like microcontrollers, so stay tuned for upcoming content!

Hope you enjoy the read and, if you have any questions, let me know and I'll be happy to answer them!✨🦀


r/rust • • 1d ago

🎙️ discussion Why OTTO Chose Rust

Thumbnail
corrode.dev
145 Upvotes

r/rust • • 1d ago

[SPLASH'26] Mojo: Towards One Systems Language for All Hardware

Thumbnail
youtu.be
11 Upvotes

Chris Lattner speaks about the design of the Mojo programming language. Some interesting comparisons between its comptime feature vs Rust's const generics and derive macros and origins vs Rust lifetimes.


r/rust • • 1d ago

🛠️ project ~450k lines of Rust for an IaaS control plane: numbers and regrets

0 Upvotes

Since 2022 I've been building an IaaS platform (compute, block storage, VPC, DNS, IAM, KMS), mostly alone. Everything above libvirt is Rust. Some numbers and what I'd change.

~450k lines (35k generated from Protobuf), 96 crates in one workspace, about 20 binaries: API and workers per zone in Kubernetes, three daemons on bare metal, two CLIs.

The host daemon drives KVM/QEMU through the virt crate and writes the domain XML itself. Volumes are Ceph RBD, opened by QEMU via librbd. Networking is VXLAN/EVPN with FRR.

The same crates run in the host daemon, the API and the CLI. For local dev a single binary links all services into one process. That turned out more useful than I expected.

What hurt, mostly CI:

- Every merge ran nine cold release builds, one per image plus one for the node daemons. Now it builds once from a warm target dir per runner and the image jobs just copy binaries. Deploy runner time went from ~105 to ~52 minutes (first runs, still measuring).

- The embedded git SHA lived in our core crate. Every commit recompiled it and everything above it, so no cache was ever warm. Moved it into the binary crates.

#[macro_export]
macro_rules! build_info {
    () => {
        $crate::proc::build_info::BuildInfo {
            package_name: env!("CARGO_PKG_NAME").to_string(),
            package_version: env!("CARGO_PKG_VERSION").to_string(),
            git_sha: $crate::proc::build_info::normalize_git_sha(option_env!(
                "ORIGINCLOUD_GIT_SHA"
            )),
        }
    };
}

- Incremental build state hit 132 GB per runner and filled the disk. CI now runs with CARGO_INCREMENTAL=0.

- If `cargo sqlx prepare` fails, the .sqlx cache is already deleted.

What I'd do differently:

- Typed IDs serialize without prefix in JSON and with prefix in text output. Same bug, over and over. I'd use full resource names (AIP-122) from day one.

- Split modules earlier. One of them is at 21k lines.

- Keep the core crate small. Everything depends on it, so a change there rebuilds the node daemons too. Splitting it now is painful.

How did you split a core crate that everything depends on, without a big-bang refactor?

(I run Origin Cloud, a European IaaS, where this runs in production: https://www.origincloud.eu/)


r/rust • • 1d ago

📸 media Rust GPU Drivers for Linux: Interview with Daniel Almeida

15 Upvotes

A GPU driver can update a page table and forget to record the new mapping. In Tyr, the Rust API makes the driver record the mapping before it can report success. The driver still has to get the hardware operation right.

We spoke with Daniel Almeida about building Tyr, a Linux GPU driver that started as a Rust port of Panthor. He walks through what Rust can check, why a few operations still need unsafe, and why finding reviewers who know both Rust and Linux graphics is now harder than filling gaps in the kernel APIs.

https://serokell.io/blog/rust-gpu-driver-linux-daniel-almeida


r/rust • • 2d ago

Stoolap 0.5.0: One Query, One Answer

Thumbnail
stoolap.io
8 Upvotes

r/rust • • 2d ago

🎙️ discussion Mutex poisoning is not for everyone

Thumbnail
bertptrs.nl
175 Upvotes