You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay so, interesting story. Thanks to your issue I learned about --remap-path-prefix=!
Here's what is happening:
When Rust compiles your binary, for every occurrence of a panic it will include information for displaying a proper panic message. This panic includes a pointer to the line and file in question. So what you are seeing are the panic message strings that are placed into the binary by the compiler.
Now, why are these paths absolute? I have absolutely no clue!
But this has been brought up before (here and here and probably many other times), so this isn't anything we're doing, but something the Rust compiler is doing.
To fix this: As mentioned in the issues I linked above there is a rust compiler flag called --remap-path-prefix= that you can use to "strip"/replace the path prefix that includes your username.
You can set these flags like so:
This will strip all the occurrences of your username from the final binary (at least it did on my machine)
Okay cool, I can hear you saying though "this is a stupid and incredibly unergonomic solution" and I would absolutely agree with you, arguably this should be fixed in rust. Maybe we can, as a stopgap solution, add these flags when the tauri cli compiles your app though 🤔
This sets rusts `--remap-path-prefix` flags to strip potential PII from release binaries by truncating absolute paths from panic messages and debug symbols.
closes: #6538
Describe the bug
Based on the recommand options from official website, I have set
strip = true
, but the compiled binary still contains my system username.binary screenshot:
Reproduction
src-tauri/target/release/bundle/macos/realapp.app/Contents/MacOS/realapp
Expected behavior
Should remove my username in complied binary.
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: