Even if you write NIF C or in Rust. They can take down Erlang's BEAM VM.
> http://erlang.org/doc/tutorial/nif.html
Erlang itself shield you from actually doing stupid thing and follow the assumptions that BEAM have while running programs.
You're better off choosing a different language. Have Erlang deal with concurrency but don't have it do number crunching.