Rust

6893 readers
53 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
1
 
 

cross-posted from: https://programming.dev/post/30061235

As part of this expansion, Qt Group will introduce new bridging technology that integrates Qt with any programming language of choice, initially including Rust, Python, .NET, Swift, and Kotlin/Java.

I'd really like to use Qt for GUI and HMI development for certified medical devices using embedded hardware, but wasn't looking forward to all the conventional C++ that would have entailed. Looks using Rust with Qt may get better soon?

Second source reporting from Qt World Summit in Munich:

Part of the thinking here is that C++ is regarded as an unsafe language whereas the languages supported by Qt Bridges are safe languages, potentially escaping the notion that because Qt is C++, it is not as safe to use.

2
3
12
submitted 3 days ago* (last edited 2 days ago) by catch22 to c/rust
 
 

Hello, I'm fairly new to Rust and came across this. Can someone explain to me how the following example is able to infer the constant value from the array length passed in? At this point, inferred type generation for function calls are a bit hand wavy, to me, does anyone know of a resource that breaks down all the different ways they can be used (for instance in this example I hadn't seen them used for consts) and what their limitations are in Rust? I often run across a 'this type can not be inferred' error without really knowing why not and just throw in the type to make it go away.

Any other examples people could point me to would be appreciated as well.

Thanks!

#[derive(Debug)]
struct Buffer<T, const LENGTH: usize> {
    buf: [T; LENGTH],
}

impl<T, const LENGTH: usize> From<[T; LENGTH]> for Buffer<T, LENGTH> {
    fn from(buf: [T; LENGTH]) -> Self {
        Buffer { buf }
    }
}

fn main() {
    let buf = Buffer::from([0, 1, 2, 3,5]);
    dbg!(&buf);
}

Edit: for some reason, the code markdown is hiding things inside of the <>'s (at least on my lemmy viewing client)

4
5
18
Stack advice (self.rust)
submitted 3 days ago by Matty_r to c/rust
 
 

Hey all, just looking for some advice. I'd like to do a WASM application, just generally like a calendar + notes app. I'd like it to work on mobile and desktop through the browser. It'll be served through Actix with Diesel for the backend. For the "frontend" I was thinking egui or leptos.

I'd like to avoid any JavaScript, so thought SSR might be the best approach.

Any thoughts/pitfalls? Should I look at something else for the frontend?

Its a lot of working parts for a calendar + notes app, but this will be a testing ground to see if I can get it all going :S

6
7
24
Announcing rustup 1.28.2 (blog.rust-lang.org)
submitted 4 days ago by [email protected] to c/rust
8
7
The new BLAKE3 hazmat API (www.iroh.computer)
submitted 4 days ago by [email protected] to c/rust
9
39
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/rust
 
 

Hi there Rustians! A few months ago I posted about my hobby project. Just wanted to give an update.

Axium is a template for an API backend.

In the last few months I have added:

  • HTTP-cookie authentication (got it to work with a javascript site),
  • Password resetting,
  • User registration,
  • Example routes for interacting with S3 storage
  • Lots of input validation,
  • Caching,
  • Mailing (for the password reset and user registration).

I think that it is almost ready to be used as a backend for my website. Almost everything is marked off my wishlist, just need a few helper to help me check the security of the authentication and registration functions.

GitHub: https://github.com/Riktastic/Axium

10
24
submitted 2 weeks ago* (last edited 2 weeks ago) by thisdavej to c/rust
 
 

This article delves into various techniques for reclaiming disk space from Cargo build artifacts.

11
48
Bevy 0.16 (bevyengine.org)
submitted 2 weeks ago by [email protected] to c/rust
12
29
submitted 2 weeks ago by secana to c/rust
 
 

Kellnr, the registry to self host crates, has a new UI. I rewrote it to make it more consistent and responsive. Give it a try, if you want to host crates on your own infrastructure. https://kellnr.io/

13
 
 

Instead of emitting one giant crate containing everything, we tweaked our SQL-to-Rust compiler to split the output into many smaller crates. Each one encapsulating just a portion of the logic, neatly depending on each other, with a single top-level main crate pulling them all in.

14
43
Rust GUI survey 2025 (www.boringcactus.com)
submitted 3 weeks ago by [email protected] to c/rust
15
16
9
submitted 4 weeks ago by blazebra to c/rust
 
 

I just released helper library for deku to decode and encode strings in popular binary layouts (fixed length, pascal-like and c-like)

https://crates.io/crates/deku_string

17
 
 

I made a small project using leptos, but after updating leptos ended up with some unfixable bugs. The error and warning messages are too inaccurate, and due to all reactivity being implicit, it is hard to read my code now and figure out what would be wrong.

I thought about rewriting everything in yew, but was wondering if things work better there. As far as I understand, there is no such thing as implicit reactivity in yew, and everything that needs to be reactive needs to be wrapped in certain types. But I am fine with that, even though #[derive(Store)] in leptos was convenient.

Does anyone use leptos or yew in production or for any more serious projects, and can share some experiences? How do you usually debug your applications? Have you given up on some application that just didn't work?

18
17
March Project Goals Update (blog.rust-lang.org)
submitted 1 month ago by [email protected] to c/rust
19
16
submitted 1 month ago by antoyo to c/rust
 
 

I've been pretty busy in my life recently, but I finally got around writing this blog post. Hopefully, things are sorted out in my personal life and I should be able to be more regular about these updates in the future.

I'm very happy to see good progress towards rustup distribution (thanks to Kobzol again!).

20
21
22
4
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/rust
23
5
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/rust
 
 

Ok so I am currently using FLTK-rs for GUI design so if there's an fellow rustacean I would like your input.

Am I making any progress in this project I have undertaken (I advise you navigate to the Files section/tab). I need some feedback

I am using FLUID to build the GUI & basically I wish to recreate LBRY-Desktop. Please do note that, I come from a non-programming background.

24
61
Announcing Rust 1.86.0 (blog.rust-lang.org)
submitted 1 month ago by [email protected] to c/rust
25
12
submitted 1 month ago* (last edited 1 month ago) by absolutely_vivid to c/rust
 
 

I built a library for working with a compression format used by Godot. It’s my first Rust library and I thought the little bit of reverse engineering I did for the format would make for an interesting blog post. Let me know what you think!

(Reposting because I still don't know understand the lemmy UI lol)

view more: next ›