3 ms·
It did not move from Rust to C++. Simias worked together with us to port it back to a C++-based emulator, and we also managed to improve several things in the p
by libretro 10y ago
It did not move from Rust to C++. Simias worked together with us to port it back to a C++-based emulator, and we also managed to improve several things in the process.
We are still keeping the two codebases moderately the same so that it's easy to backport stuff back and forth inbetween the Rust/C++ versions.
Mednafen/Beetle PSX right now is a more fleshed out PlayStation emulator that has seen more years in development and therefore is more mature, while Rustation is still a relatively new emulator with lots of parts (CDROM/SPU/etc) still not implemented. Backporting the renderer as a pseudo plugin to a more mature emulator has the benefit that the GPU part can be nearly finalized so that most of the hard work should be done by the time Rustation gets to the stage where the other elements of the emulation are mostly complete.
In short, it helps out both projects and we work closely together with the author. The port to C++ was mostly a team effort between him, us and several other guys.
- diamondlovesyou 10y agoBut why not just export a C interface from Rust, and use that from PSX?
- klodolph 10y agoRust <-> C++ via a C interface is a lot of work and not a lot of fun.
- libretro 10y agoWhat you just described has already been there for months, before the C++ port happened, however, we still needed a C++ port so that we can draw in some experienced devs who were mainly at home in C/C++ land to do the Vulkan part, and also because it is easier to compile for both our buildbot and other users. Anyway, you can use the external Rust renderer through this C-based API, or the C++ integrated renderer. The main point is to keep both codebases more or less in sync with each other. Libretro as a project generally favors C/C++ codebases. There is one or two Rust-based cores, though, which happen to be done by the same author, simias (same guy the renderer here comes from).
- pcwalton 10y agoCool, thanks for the info. Fantastic work as always :)