Y
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
brianberns
3330 days ago
Yes, or some other identifier that's unique to that crate. Assuming that the crate name is also a valid file name seems risky.
link
nomercy400
3330 days ago
Or have a prefix. Once cost me exam points trying to optimize a prefix away. The examinators were right.
link
wwalexander
3329 days ago
You could just hex encode the crate name. No need to hash it too.
link