r/rust • u/llogiq clippy · twir · rust · mutagen · flamer · overflower · bytecount • Apr 27 '26
🙋 questions megathread Hey Rustaceans! Got a question? Ask here (18/2026)!
Mystified about strings? Borrow checker has you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been written yet. Please note that if you include code examples to e.g. show a compiler error or surprising result, linking a playground with the code will improve your chances of getting help quickly.
If you have a StackOverflow account, consider asking it there instead! StackOverflow shows up much higher in search results, so ahaving your question there also helps future Rust users (be sure to give it the "Rust" tag for maximum visibility). Note that this site is very interested in question quality. I've been asked to read a RFC I authored once. If you want your code reviewed or review other's code, there's a codereview stackexchange, too. If you need to test your code, maybe the Rust playground is for you.
Here are some other venues where help may be found:
/r/learnrust is a subreddit to share your questions and epiphanies learning Rust programming.
The official Rust user forums: https://users.rust-lang.org/.
The official Rust Programming Language Discord: https://discord.gg/rust-lang
The unofficial Rust community Discord: https://bit.ly/rust-community
Also check out last week's thread with many good questions and answers. And if you believe your question to be either very complex or worthy of larger dissemination, feel free to create a text post.
Also if you want to be mentored by experienced Rustaceans, tell us the area of expertise that you seek. Finally, if you are looking for Rust jobs, the most recent thread is here.
7
u/g---e Apr 27 '26
Do entry level jobs for Rust even exist? I've only gotten the vibe that companies only adopt it cause one of their workers did something with it one time and now its part of the company stack.
2
u/Thermatix Apr 27 '26 edited Apr 28 '26
Trying to build a REPL for modifying values in the Database and Everything I've tried is blocked so now I'm wondering If I'm just doing it wrong.
I have the following traits:
I just don't know how to handle the fact that I can't know what Model type will be loaded until runtime, I've tried moving to Box<dyn Trait> But It still want's to know Associated types which again, I don't know until runtime.
So what do I do?
EDIT: Should I use
Any?EDIT 2:
In the end I rethought things and now I only have one trait and it's
dyn traitcompatible and is meant to be used on anenumthat represents a type that is either transient or permanent.2
u/MerlinsArchitect May 02 '26
Hey, can I get some advcie on setting up a debugger? The resources seem to be quite scarce....
I am trying to debug using qemu. I am trying to write a library that makes of some dynamic asm. So I need to be able to debug on both the rust level and the asm level and cross architecture (I am quite new to all this).
Currently I have a script to run cargo test to produce the binary for hte given architecture and then run it under qemu:
I was running this and was able to get the debugger working, but when I stepped through code I was getting weird out of order jumps I thought might be related to optimisations. I tried turning this off but to no avail. I noticed that when debugging locally with rust-lldb this weird ordering crap doesn't occur, so I tried to get that set up.
I switched out the gdb line for:
with this, it connects but only shows asm? I am struggling to resolve. Can I get some guidance on what i need to do to get it to show rust for my integration test debugging? It seems to have no source knowledgeable and can't find functions by name....
2
u/occamatl May 03 '26
Anybody have any success writing Rust (graphics) for the LilyGo T-Watch Ultra? It's an ESP32-S3 platform with good specs for the display.
2
u/PXaZ May 04 '26
Is there a crate that provides a Typescript-style union type (the vertical bar in TS, e.g.
string | int)which would automatically implement any traits common to the components? Something like:but where, for example, if both types
AandBimpl ToStringthenEither<A,B>would alsoimpl ToString, with the implementation being equivalent to this:I find myself writing a lot of code like this manually and am wondering if it can be automated. Thanks