Aside from the actually good use cases other comments have mentioned, one idea I've played around with is using it for augmenting an Elixir app with code that can be run in both the browser and the server - use a NIF to run the Rust code server-side, compile it to WASM to run in the browser. The idea that inspired me was writing input validation code, running it both in the browser for greater responsiveness and on the server for making sure inputs get validated, using the same source code so those don't get out of sync. It's probably not worth the added complexity, but it's kind of neat.
I suppose the only downside of using the same code is it has the same bugs (e.g. I forgot to strip whitespace before doing a length check). So you don't get a belt and braces of having two lots of independently implemented validation
But then the upside is that it has the same bugs, so you only have to fix it once
Even if it's buggy, I figure it'd at least be consistently buggy. Part of what spurred me to make this was an issue I had with account setup for a local utility's website; their client-side validity check for creating a new password was apparently using different logic than the backend code. I kept trying to create a password, the web page said it was valid, then I'd hit submit and get rejected for having an invalid password.