r/rust • • 7h ago

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

Thumbnail youtu.be
2 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 • • 2h ago

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

4 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 • • 11h ago

Stoolap 0.5.0: One Query, One Answer

Thumbnail stoolap.io
4 Upvotes

r/rust • • 21h ago

starting with 3D gamedev in Rust

5 Upvotes

hi
I've recently finished a multi-month long journey in game development in Java, and made primarily 3D games using libGDX and LWJGL3. libGDX and LWJGL3 were both nice and relatively easy to use (and I didn't have to fight the GC at all for performance), but I had a nagging feeling that I should experiment more anyways.

more specifically I felt like I should experiment with a systems language for game development. I already know the basics of C and C++, but opted to go for Rust instead. I've heard horror stories about C and C++, and seeing as I'm doing this for a hobby, I didn't want to put up with any of it. Rust, as I've been progressing through "the book" as been a genuine joy to use, and actually has some higher level conveniences than what Java can offer, such as more expressive pattern matching, the lack of null, and a really lovely package manager + build system (no more gradle!).

I totally get that the journey of Rust gamedev will not be painless, especially as I'm thinking about using SDL3 and wgpu to write a *3D* game in, but I'm seriously excited for it!

does anyone have any Rust gamedev tips they could offer? thanks!


r/rust • • 7h 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 • • 2h ago

Brno Rust Meetup at Base48 hackerspace Brno

Thumbnail reddit.com
1 Upvotes

r/rust • • 19h ago

Pruning old cargo-installed tools freed more space than expected

1 Upvotes

After the recent posts about registry and rustup sizes, I looked at what `cargo install` had accumulated over time. A bunch of one-off CLIS and older versions were still pulling in their full dependency trees in the registry.

`cargo uninstalls removes the binaries but leaves the cached crates behind. Manually checking `~/.cargo/registry/src` and removing entries tied to uninstalled packages recovered a few more gigabytes without issues, since anything needed gets redownloaded on next use.

Do people have a preferred workflow or script for tracking and cleaning these installed-tool dependencies, or do you just leave them?


r/rust • • 43m ago

🛠️ project I built GitCraft - a free, open-source GitKraken alternative with local AI support

0 Upvotes

Hey everyone!

I've been working on a project called GitCraft, a Git client designed to offer a similar look and feel to GitKraken, but without the subscriptions or restrictions on using your own local AI models.

The goal is to create a modern, feature-rich Git client that gives developers more control without locking useful functionality behind a paywall.

A few highlights:

  • Free and open-source
  • Familiar GitKraken-inspired interface
  • Local LLM support without additional subscription fees
  • Cross-platform support for Windows, macOS, and Linux
  • Focused on adding useful features and improvements based on developer feedback

I'm actively developing GitCraft and would love to hear what the community thinks!

GitHub: https://github.com/MystifiedSky/GitCraft

If you've used GitKraken or other Git clients, what features do you wish they had? What would make you consider switching?

Feedback, suggestions, issues, and contributions are all welcome!

And yes I used a $20 claude sub to create this over the last couple weeks instead of spending the $50+ a year for gitkraken with all its negatives. I am a software engineer with 6+ years of experience so I have a lot of knowledge behind the scenes but this was just a fun little project to save some $$$ in the future.


r/rust • • 2h 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 • • 5h ago

🛠️ project CGP v0.8.0 - cargo-cgp, new documentation, and namespaces | CGP

Thumbnail contextgeneric.dev
3 Upvotes

Author here. I am excited to announce the release of Context-Generic Programming (CGP) v0.8.0!

Context-Generic Programming (CGP) lets a Rust trait have several implementations that would normally overlap, such as one for every T: Display and another for every T: AsRef<[u8]>. Each application picks the implementation it wants, the compiler resolves that choice to direct calls, and CGP itself is an ordinary library on stable Rust.

Most of this release is about making CGP easier to learn and debug:

  • cargo-cgp v0.1.0 explains wiring errors in terms of the code you wrote, rather than the code the macros generated. When a provider needs a field your type lacks, for example, cargo cgp check names the missing field and suggests adding it. It leads with the root cause for the classes it recognizes, though it does not yet reshape every class.
  • New documentation covers every construct, the core concepts, comparisons with other languages, and real projects. AI agents wrote much of it under my direction, and the post explains how that writing is checked.
  • Namespaces let an application select whole groups of implementations by path, instead of listing every component in its wiring.

If you want to try it, the Quickstart is short. And if a diagnostic or an explanation still loses you, I would like to hear where.


r/rust • • 7h ago

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

7 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 • • 16h ago

🎙️ discussion Cross compilation targets add up fast in rustup

0 Upvotes

After seeing the recent posts about rustup and registry sizes I checked what targets I had installed. A few experiments with wasm32-unknown-unknown, aarch64-unknown-linux-gnu, and thumbv7em-none-eabihf from last year were still sitting there along with their full toolchains.

rustup target removed on the unused ones dropped several gigabytes right away. I kept only x86_64-unknown-linux-gnu and the one or two I actually build for regularly.

Do people have a habit of pruning targets on a schedule, or do you just leave them until disk space becomes an issue?Any scripts or aliases you recommend for spotting the ones that haven't been used in a while?


r/rust • • 44m 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 • • 3h ago

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

1 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 • • 12h ago

🎙️ discussion Mutex poisoning is not for everyone

Thumbnail bertptrs.nl
111 Upvotes

r/rust • • 6h ago

🎙️ discussion Why OTTO Chose Rust

Thumbnail corrode.dev
72 Upvotes

r/rust • • 23h ago

Does Daniel Stenberg have a point about Rust rewrites?

Thumbnail daniel.haxx.se
162 Upvotes

r/rust • • 4h ago

🛠️ project How curiosity about building my own programming language led me to build a museum of miniature virtual machines in Rust & D

Post image
0 Upvotes

Hey everyone!

It all started simply enough: I was just curious about how to build my own programming languages.

That curiosity led me to explore assembly, which naturally led to writing bytecode interpreters, and step-by-step, I ended up building a whole collection of custom virtual machines.

Since I couldn't find a clean "museum" of VM samples to study how different architectures work, I built one: Friendly-Virtual-Machines.

What's in the repo?

Every VM in the collection is built from scratch with zero external dependencies and stays under 7,000 lines of code. They all include custom assemblers (with symbol table label resolution), CPU state handlers, and native benchmark suites.

• Rust Samples: 5 register-based VMs, 1 memory-to-memory VM & 1 stack-based VM exploring different design patterns.

• D Sample: My latest addition—a register-based RISC-style VM written in D with a custom text assembler, hitting a performance gap of just 5.66x to 17.70x compared to native compiled code.

The best part? Because they are lean and self-contained, everything compiles and runs smoothly right on mobile Termux. And I am consistently adding more samples to it as I learn & build more.

Looking for Reviews & Contributions!

I'd really appreciate feedback from folks experienced in systems programming, compilers, or VM design—whether it's reviewing my dispatch loops, pointing out architectural trade-offs, or suggesting ways to optimize further.

If you'd like to contribute your own miniature VM sample (in Rust, D, JS, or any language that runs cleanly with zero dependencies), PRs are completely open! Check out the CONTRIBUTING.md in the repo for the exact guidelines.

🔗 GitHub: Friendly-Virtual-Machines