Or you can just make a remote node out of your C/Java/Rust/whatever code and not worry too much about it crashing your Erlang system.
It's not just crashing either, it's taking a long time to execute a given function in the native code - that can also cause problems for the Erlang system running it.