Override the temporary directory for WASI or Android
masterOn certain platforms, you must explicitly define the temporary directory to avoid panics or to ensure files are stored in the correct location:
- WASI P1/P2: Does not define a default temporary directory. You must call
tempfile::env::override_temp_dirwith a valid directory, otherwise temporary file creation will panic. - Android: You may need to override the temporary directory to point to your application's per-app cache directory.
Use tempfile::env::override_temp_dir to set the path.