Lossless path serialization/deserialization
⚓ Rust 📅 2025-11-27 👤 surdeus 👁️ 6I need to store the original pathname in persistent storage. In cross-platform cases I usually just do the "Your path must be convertible to utf-8" thing, but what I'm working on now requires lossless storage of the original path-and-filename. Moving names between platforms is not a thing here -- I just need Windows names on Windows and unixy names on unixy platforms.
Does anyone know if a crate that can do this? The format of the serialized name does not matter (hex, base64, base85, ..), as long as it can be stuck in a quoted string in some common storage format (RON, Kdl, json).
(Just to (re)emphasize: It's important that the deserialized name exactly matches the original name).
4 posts - 4 participants
🏷️ Rust_feed