sux-rs icon indicating copy to clipboard operation
sux-rs copied to clipboard

`TmpDir` needs customization

Open RagnarGrootKoerkamp opened this issue 1 year ago • 4 comments

At least on Archlinux, /tmp is a tempfs and hence in RAM, and limited in size to half the available memory. Solaris and Fedora also do this apparently.

For me to use SigStore I'd like to provide a custom directory for the temporary files.

https://github.com/vigna/sux-rs/blob/e081b427f99eeb5ce127dc74c5c03cd0862912c2/src/utils/sig_store.rs#L348

RagnarGrootKoerkamp avatar Nov 12 '23 12:11 RagnarGrootKoerkamp

iirc it can be customized with the TMPDIR env var

zommiommy avatar Nov 12 '23 12:11 zommiommy

oh right; that may be sufficient indeed. Would be good to document this.

RagnarGrootKoerkamp avatar Nov 12 '23 12:11 RagnarGrootKoerkamp

yeah its in std::env::tmp_dir but I forget every time

zommiommy avatar Nov 12 '23 12:11 zommiommy

Yes, I think of doing it every time and then I forget. It might be useful to have a settable temp dir tho.

vigna avatar Nov 12 '23 15:11 vigna