To be fair, big refactors like this need to be done gradually. This is obviously the first step.
Next step can be to port it using e.g. tractor tooling and have a bunch of unsafe calls you need to implement. It's a really fun puzzle. The goal is to have no more cpp dependency