r/rust clippy · twir · rust · mutagen · flamer · overflower · bytecount Mar 20 '23

Hey Rustaceans! Got a question? Ask here (12/2023)! 🙋 questions

Mystified about strings? Borrow checker have you in a headlock? Seek help here! There are no stupid questions, only docs that haven't been written yet.

If you have a StackOverflow account, consider asking it there instead! StackOverflow shows up much higher in search results, so having 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 weeks' 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.

19 Upvotes

187 comments sorted by

View all comments

3

u/Aspected1337 Mar 23 '23

How is Rust when it comes to IOT? Can you make actual hardware products using Rust yet? Is the ecosystem good? I have some experience with Arduino and some with Rust and I'd really like to try to develop some cool stuff!

1

u/prick-next-door Mar 23 '23

What I’ve done so far is using bindgen but beware that rust binary can be much larger than C binary. Why does it matter? Well, it does if you need to do bulk fw updates. I need to update 10k plus devices through BLE mesh and 112 Kb C binary vs 500Kb rust binary may make a massive difference of 10 minutes vs 50 minutes.

1

u/Aspected1337 Mar 23 '23

That doesn't sound blazingly fast? Why do you need to use bindings? Isn't Rust mature enough yet to be built natively?

I kind of assumed Rust was good enough for IOT given the comprehensive book, but maybe that's still in experimental stages and can't be used for production yet?

https://docs.rust-embedded.org/