7 ms·
Question, what made it easier to build this in Rust than other languages? I know the advantages of Rust, but what exactly was the experience in this context?
by sidcool 8y ago
Question, what made it easier to build this in Rust than other languages? I know the advantages of Rust, but what exactly was the experience in this context?
- deleted 8y ago[deleted]
- joshbaptiste 8y agoImplementing an NES emulator is a great way to learn more about a language and the internals of the NES (which is well documented). It's sorta like a rite of passage and has been done in most of the "newer" languages like Nim (https://github.com/def-/nimes https://github.com/def-/nimes) , Go (https://github.com/fogleman/nes https://github.com/fogleman/nes)
- ofrzeta 8y agoIt's actually "rite of passage" as in latin "ritus".
- joshbaptiste 8y agooops fixed.. thx
- primo44 8y agoAlmost: rite _of_ passage (not "to")
- joshbaptiste 8y agoargh.. fixed again thx
- jerf 8y agoYou have now completed this write of passage.
- oconnor663 8y agoTo become a passage wright.
- nukeop 8y agoWell-documented, but many sources are contradictory. For such well researched hardware, there is a lot to be confused about when researching this topic by yourself.
- Kye 8y agoAt least there's no shortage of implementations to reference.
- deleted 8y ago[deleted]
- FartyMcFarter 8y agoIt seems that unsafe references were used, so the advantages of Rust appear to have been somewhat relinquished in this case.
- bionicbits 8y agoI am not sure you can not use `unsafe` in an embedded type of project. `unsafe` isn't necessarily bad, but when used at least makes it very clear where extra attention should be paid.
- nukeop 8y agoI also wrote a NES emulator in Rust, and managed to do it without using a single unsafe block. I used SDL bindings for graphics, if that counts, but it can also run in headless mode (for testing) without SDL perfectly well.
- neurotrace 8y agoDo you have a link? I'd like to see how yours compares with OPs
- hopler 8y ago
- bfrydl 8y agoThe author doesn't really suggest that Rust was chosen for any particular reason. A few benefits are mentioned but they aren't really specific to emulators.
- ChrisRR 8y agoBecause why not?
- xfer 8y agoIt's probably because implementing an emulator is highly rewarding and easy enough, hence makes it more exciting during learning a new language and NES is extremely well-documented.
- hu3 8y agoFrom the article: "C is probably still a better choice for those cases: It’s more difficult to find someone who can implement a Rust compiler than a C compiler. But Rust seems usable in any project where C++ is a viable language."