Aleph-Bet-Marathon / alephbet

Open source continuation of the Marathon 2 game engine.
GNU General Public License v3.0
0 stars 3 forks source link

Rewrite in Rust #10

Open SolraBizna opened 2 months ago

SolraBizna commented 2 months ago

This issue is here to stop @SolraBizna from suggesting a Rust rewrite.

SolraBizna commented 2 months ago

A total rewrite in Rust is obviously not a feasible or reasonable project. And while it's true that Rust can interoperate with C, and therefore that rewriting smaller portions of the engine in Rust is possible, there would be very few benefits until basically the whole engine was rewritten.

However, there are some cases where an enhancement would be easier to write in Rust than in C++. #9 is the best example so far; asset loading takes place in a distinct stage, involves a relatively small cross section of the engine, and plays to Rust's strengths, while the benefits of an efficient multithreaded asset loader are considerable.

This would require changes to the build system. The Rust-specific code would be in a separately-built library. A lot of extra pain would be involved integrating such code with the XCode and Visual Studio projects. Unifying the build system first would be good. A crackpot idea along those lines would be using cargo to build Aleph One even before it contains any non-trivial Rust code...