There are several bad architectural decisions and when your architecture is wrong, the quality of the code itself doesn’t really matter (to be more specific, I was talking about architecture in my previous comment, not the code itself, I don’t know Rust so I can’t really comment on that).
To fix the architecture, major parts would have to be rewritten, almost making it a different codebase, because pretty much no part would be left unturned.