Live data from Hacker News

Implementing a NES Emulator in Rust

michaelburge.us

91–93 of 93 posts

Re: Implementing a NES Emulator in Rust

#91
post #90
post #77

Earlier quoted context omitted.

Are you sure about that? https://github.com/simias/gb-rs/blob/master/Cargo.toml#L29

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.

It’s always impossible, as you have to call into the OS at some point to do anything of use.

Re: Implementing a NES Emulator in Rust

#92
post #88

This is the second emulator I'm seen in rust, the other being an ARM emulator done as a personal project by somebody who was an intern here. I do emulators, but in C. (BTW, hiring) For an expert performance-sensitive C programmer who pulls out all the platform-specific tricks to make stuff go fast, how do you think rust would be? The default safety is appealing, but I have lots of concerns. Bitfield access looks pain…

Rust has no strict aliasing, so all Rust types are may_alias.

I thought it was the other way, all being effectively restrict, with the hazard removed by the borrow checker.

In any case, I want to be able to have both behaviors.

Post reply on HN