perl-uri
URI and filesystem-path normalization for Perl tooling.
Use this crate when a caller may hand you either a file:// URI or a raw
filesystem path and you need a stable representation for caches, lookups, or
workspace edges.
Where it fits
perl-uri sits at the protocol boundary. It is used by LSP and DAP code before
files hit the parser, workspace index, or other path-sensitive layers.
Key entry points
uri_to_fs_path(uri)- convertfile://URIs to filesystem pathsfs_path_to_uri(path)- convert filesystem paths tofile://URIsnormalize_uri(uri)- normalize raw paths, malformed file URIs, and valid URIsuri_key(uri)- produce a lookup key with Windows drive-letter normalizationis_file_uri(uri)andis_special_scheme(uri)- classify URIsuri_extension(uri)- extract the extension from a URI string
Example
use ;
assert_eq!;
assert_eq!;
Typical use
Use perl-uri when you need consistent cache keys or filesystem lookups
without making callers care whether they passed a URI or a path. On wasm32,
only the URI-parsing helpers are available.