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
Use the hash of the template and don't include its contents when building for release under some circumstances.
This prevents us from leaking filepaths into applications for privacy/security reasons.
// If this is a release build, strip the location out of the template for smaller binaries and so we don't leak that information#[cfg(not(debug_assertions))]return{use std::hash::{Hash,Hasher};letmut hasher = std::collections::hash_map::DefaultHasher::new();ifletSome(first) = self.roots.first(){
first.hash(&mut hasher);}let hash = hasher.finish();let lit_str =
syn::LitStr::new(&format!("{hash}"), proc_macro2::Span::call_site());quote!{ #lit_str }};
The text was updated successfully, but these errors were encountered:
jkelleyrtp
changed the title
snip template contents in released mode
snip line/col info from templates in release
Jun 19, 2024
Feature Request
Pulled from #2365
Use the hash of the template and don't include its contents when building for release under some circumstances.
This prevents us from leaking filepaths into applications for privacy/security reasons.
The text was updated successfully, but these errors were encountered: