Notably on iOS there's no good way to isolate unsafe native libraries from the rest of your app without violating app store policies, because Apple enforces apps to be single process and doesn't allow use of its own sandboxing apis.
Edit: actually no, XPC Services are Mac only so wouldn’t help on iOS.
WASI would be the closest thing to a secure runtime