Embedded Rust will ALWAYS Be Unsafe #EmbeddedRust #UnsafeCode #InterruptDriven #Programming

preview_player
Показать описание

🔧💻⚠️ Curious about embedded rust code? 🤔 Learn why it inevitably includes unsafe code and how it differs from unsafe C. 🔄 Watch now to find out! #techtips

🔥🔥🔥 SOCIALS 🔥🔥🔥
Рекомендации по теме
Комментарии
Автор

So basically, structure your code the right way and all the code that deals with unsafe things is in one module.

anon_y_mousse
Автор

They say that "Rust never sleeps" but Rust can certainly tell a thread to sleep and Rust can interrupt sleep. Perhaps one might say Rust programmers never sleep.

stapler
Автор

I give you props for trying to explain it, but you left me more confused than I started.

GimmilFactory
Автор

You can pry C from my cold, dead hands

heavy
Автор

Is all of software engineering just a series of increasingly convoluted interfaces and higher order abstractions?

benshapiro
Автор

Me as a javascript developer: "That makes sense, yea.."

Sameer.Trivedi
Автор

I'm a much higher level software engineer, mainly working in UI and server web development. Loving your videos, you're really great at explaining these concepts in a palatable way!

PikaRyan
Автор

I just use Zig for my own embedded projects, now. Makes far more sense to me. Just like I wouldn’t use C++ in embedded. So Zig for me is the new goto for embedded. I love Zig, I have nothing against Rust (except the foundation) but Zig is just so much quicker to code for embedded and like C you can pretty much see what the assembly will be. ❤❤❤

CallousCoder
Автор

As said in another short, embedded programming is about managing "magic" addresses in use by the hardware, while interrupt programming usually adds some programming of the CPU itself. Both have to be inherently unsafe operations in Rust the same way calling out to the OS in a hosted environment is.

DSamp
Автор

Rust developers explaining why unsafe Rust is also safe:

MavikBow
Автор

Honestly, and this might be a crazy take, I think that having specific blocks of code marked as unsafe is not only not a bad thing, but can actually be great for helping you think about how to structure your code. I.e., if you're in higher-level code and you find yourself needing to use an unsafe block, it can be a great indicator that you're mismatching different levels of abstraction, and you should create a lower level module.

grantpeterson
Автор

When you started to explain interrupts my connection froze on the short. I thought you edited the video to have that fake interrupt in it lol. Nope, just shitty cell service

Warpgatez
Автор

People on treadmills because you said the word "run"? Really? Wow, that made your video so much better!! This stock footage insanity has got to be stopped!!

MiNa-kvlp
Автор

Future programmers: what's an unsafe code? Sounds fun, let's take a risk and try it.
Actually unsafe code: just accesses memory directly.

kinershah
Автор

From a guy that does programming from time to time I can say that C's syntax is so much easier to understand that it makes Rust annoying. Why do modern programming languages try to reinvent the wheel instead of improving on something that's aleady good?

BogdanSerban
Автор

millions of embedded systems have been using C for such a long time before rust was invented and C was developed to abstract assembly directly. If your unsafe blocks are causing that many issues you arent building your program correctly

MrTacoSr
Автор

safety means that the reference/pointer you have points to the data structure of a specific type. i.e. no void*.
Interupt is not a data structure, it's a hardware async execution model so has nothing to do with safety/unsafety

andryakaaad
Автор

It might be when you shoot yourself in the foot in c++, you lose a leg. But in Rust you are forced to first remove your legs so that there no foot to shoot at😂

mikeyangyang
Автор

Configuring interrupt requests in Windows was so stressful when you actually had to do that.

fishcadet
Автор

Man. Software engineers make everything sound complicated.

rohitavadhani