Hacker News new | ask | show | jobs
by yrashk 3330 days ago
Wouldn't it make sense for Cargo not to use crate names in file names, and use hexadecimally encoded hashes instead?
3 comments

Yes, or some other identifier that's unique to that crate. Assuming that the crate name is also a valid file name seems risky.
Or have a prefix. Once cost me exam points trying to optimize a prefix away. The examinators were right.
You could just hex encode the crate name. No need to hash it too.