I'm not sure that's feasible.. there are exactly zero independent TeX or TeX-like implementations, everything is patches on top of TeX, which probably has a reason (given the general open source community's inclination to rewrite things). I am by no means an expert on TeX internals, but just cursory browsing of the code makes it look like a rather massive and complex piece of software.
Fortunately, the core engine is essentially self-contained. Almost all of the things that make the TeX frustrating come from the UX, or the difficulty of adding new capabilities that call for somewhat more modern C code. By compiling all of the C with a Rust wrapper, we get a single binary out in the end, plus the ability to extend the engine in ways that were just not feasible before.
Revamping the core engine code from C to Rust would be nice, because it could be cleaner and more comprehensible, but it actually doesn't buy you anything in terms of the UX.
Edit: also, I didn't realize this when I made the decision to fork XeTeX, but LuaTeX has shifted to a C implementation that is more or less detached from the original WEB code.
Seriously, and even if tex isn't perfectly secure, who cares? I don't think people compiling foreign latex documents is a big prize for any hacker, there's just so many more easily weaponized attacks.
It isn't security I'd be worried about. I'm sure there is some real wizardry in the formatting algorithms and many bugs related to it fixed over the years. Rewriting the TeX engine would just be a huge effort to almost certainly arrive at an inferior and incompatible clone.
Pandoc seems to exist only to support moving from one markup language to another. And markup languages seem to proliferate when people decide to trim down the options from what they had been using. Only to build them back up to the point that a new one is formed, to trim down the options.
Which is ultimately frustrating if you ever try to go back to an old document, and realize you don't have the exact markup engine that you used back then, so that you can't actually rerender it.
Now, to be fair, often this is ok. In particular, you might not care about how it rendered before, and a minimal markdown is fine.
However, if you do care about presentation, it is maddening.
There may be more people who want a TeX-style layout engine in an embeddable form, without the TeX macro language. Or a multiple-scale version of it, which would make it easier to avoid widows and orphans, by making it possible to reconsider earlier page breaks. (Once upon a time, large computers really could hold only one typeset page in memory; no longer.)
If you who want something 100% compatible with TeX, you already have it, and it's not clear why you'd care about the implementation language.
Have we really come a long way since the original TeX? We certainly found fancier bugs to put in programs. And evidently gave up on understanding memory usage, at large. We certainly have not found a way to make it easier for folks to read programs.
Seriously, even if you are not familiar with Pascal, it is not as unapproachable as could be imagined.
Having just cursed whatever bloody build system we now have for a simple 3 page web app that seems to cache off half of the bloody internet, I am curious on the complaint leveled against TeX. Especially since the vanilla TeX has very little dependencies and you have to explicitly install every style that has ever been created. :)
We've come a long way since the original literate TeX program.