News for hackers. Stuff that matters.
Re:Implementing a NES Emulator in Rust by simias on Tuesday March 19, 2019 @12:33PM (#19432426)
Writing an emulator is not really embedded programming (the target often qualifies as an embedded environment but the host can be any random desktop computer).

It's definitely possible to write an emulator without unsafe code. Here's a toy gameboy emulator I wrote a while ago in Rust without any unsafe code: https://github.com/simias/gb-rs

Here's a very incomplete PSX emulator with only a single unsafe (which might not even be necessary anymore, I haven't updated the code in a while): https://github.com/simias/rustation

Re:Implementing a NES Emulator in Rust by mzs on Tuesday March 19, 2019 @03:06PM (#19434418)
Re:Implementing a NES Emulator in Rust by simias on Wednesday March 20, 2019 @10:26AM (#19442524)
The SDL2 dependency? I don't understand what you mean by that.

Or are you saying that a dependency that I use happens to use unsafe code? In which case it's true but then by that definition it's effectively almost impossible to write 100% safe rust since the stdlib itself contains a non-negligible amount of unsafe code.

Re:Implementing a NES Emulator in Rust by steveklabnik on Wednesday March 20, 2019 @10:51AM (#19442776)
It’s always impossible, as you have to call into the OS at some point to do anything of use.