And on Apple Silicon, it just runs the Switch’s Arm64v8 instructions natively using a hypervisor! [1]
For the MacOS port, they also added an ARM-to-ARM JIT in case hypervisor runs into issues.
Having worked in industry for some multiple of decades, I can say with some confidence that if a small team were to successfully build and deploy their own JIT recompiler to solve an actual customer problem, they would be considered gods by management and given bonuses and promotions. Realistically the project would never get off the ground because their management would be pressuring them to hurry up and add some random new API within the next quarter. Most devs just looking at the existing code and are more or less doing a copy-and-paste with some minor tweaks for their new "feature." They're trying to slap together quick demos that are little more than, "And now this thing makes an RPC call to that thing." The level of performance I see from people who pull down well into 6 figures of income typically falls well below the level that I'm seeing in this Switch emulator project.
Usually for something like that to actually happen it takes a VP mobilizing an org of size 20+, with multiple layers of management taking a year or more to hire or steal talent from other orgs. Some companies are built differently (i.e., Apple) and can pull cross-org talent together for something like "get Intel binaries running pretty well on M1." But I find that tends to be the exception rather than the norm for larger tech companies.
Maybe I'm just working in the wrong places.
With a passion project, you start and stop whenever you want, and if you're not interested, you're not working on it anymore. So only the people who are truly intrinsically motivated will continue.
A paycheck is a form of compulsion. "You could be do anything, but you're doing this for me specifically because I pay you." You might also be very interested, but it's the only thing that specifically binds you to the company vs bound to the work itself.
If you told me I have eight hours a day to work on this and I have to spend those eight hours a day, you will get a far better emulator than if I had to do this only on the weekends and I could quit at any point and that is how most personal projects end up. In some half baked state and nobody uses it.
I'm actually tinkering on a WASM runtime and emitting MSIL code from WASM trees is quite straightforward so far (tho running into some more complicated cases now that I'm integrating the test-suite), compared to the non-trivial (code stamping) pure native JIT's I've done in the past it's quite a big timesaver (and those still only did target one CPU platform).
They keep adding tools that allow for very low-level memory management/manipulation and the ability to run on so many platforms/generate native code makes it very attractive. It's also just fun to write.
I've been having issues with golang's opaque GC when targeting wasm. Does C# offer anything on that front? Can I at least control when it triggers?
[2] https://github.com/ClassicUO/ClassicUO
Shit shouldn't have thought about UO, now I am sad :'( (and old)
I’ll never forget how magical it was to make my first edits to the code and see it reflected in the game. Created a feedback loop that has continued to reward me over 20 years later. :)
It probably goes C/C++ (it's really hard to disambiguate the two, in this case; few codebases are pure either way) then Rust (for hobby emulators, it's probably third or fourth for serious efforts), C# and Java.
JavaScript and Python are very common for hobby efforts, but generally exceptions for serious codebases (excepting WASM).