tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

[building] - turn off panics

Open nothingismagick opened this issue 4 years ago • 4 comments

While discussing errors, @wusyong recommended this approach:

https://github.com/tauri-apps/tauri/issues/613#issuecomment-633921807

Basically on release stop errors from propegating (because during reversing this information can be very useful to the attacker).

[profile.release]
panic = "abort"

nothingismagick avatar May 26 '20 09:05 nothingismagick

Should it be done manually or automatically on build? Maybe automatically and optionally defined by users?

Laegel avatar May 26 '20 10:05 Laegel

default: off, opt-in?

nothingismagick avatar May 26 '20 12:05 nothingismagick

Maybe "on" for tauri dev and "off" for tauri build and let users force it globally. That looks like something that should remain at dev level, right? Anyway, this issue is not about specifications for this demand, I digress, haha.

Alright, I suggest to put that part in the current "App Publishing" part.

Laegel avatar May 26 '20 13:05 Laegel

I found a tweet thread might be interesting to you. And this article on "Operational errors vs. programmer errors".

So I pretty much agree to abort on panic in release build. Not sure what will tauri dev does internally. But if it's somehow equivalent to debug build in cargo, I think that's reasonable to still do stack unwind then.

wusyong avatar May 27 '20 05:05 wusyong