libpath.Rust
Path parsing library, for Rust
Table of Contents
Introduction
libpath.Rust is a small Rust library for classifying Unix-like and Windows path syntax. It reports path components as positions into the original input string, without accessing the file system.
Installation
Reference libpath from Cargo.toml:
= { = "0.0.3" }
The repository retains Cargo.lock to make local and CI verification
reproducible. Release and validation commands use --locked.
Components
Common result type
libpath::util::common::ClassificationResult describes the positions of
the input, root, directory, entry name, stem, extension, and related path
parts. Its fields use fastparse::fastparse::types::PositionalSlice.
Unix path classification
libpath::util::unix::path_classify() classifies Unix-like paths and
returns libpath::util::unix::Classification together with a
ClassificationResult. The module also defines the parsing flag constants
in classification_flags.
Windows path classification
libpath::util::windows::path_classify() classifies paths using forward
or backward separators, drive-letter roots and relative drive paths, and
the currently implemented tilde-rooted form. It returns the Windows
Classification and a ClassificationResult.
Examples
There are no maintained example programs yet. The libver binary is a
deliberately retained scratch utility that prints the package name and
version:
cargo run --bin libver
It is a repository utility rather than an example of the public path API.
Project Information
Where to get help
Contribution guidelines
Defect reports, feature requests, and pull requests are welcome on
Minimum Supported Rust Version (MSRV)
The declared Minimum Supported Rust Version (MSRV) for libpath.Rust is 1.74.
This MSRV guarantee applies to the library crate itself, its runtime dependencies ([dependencies]), and its build dependencies ([build-dependencies]). Downstream consumers compiling this crate as a dependency are guaranteed that it builds cleanly on the declared MSRV toolchain.
Development dependencies ([dev-dependencies], such as benchmarking frameworks like criterion) may require newer Rust toolchains for local development or performance testing. These dev-dependencies are never fetched or compiled by downstream consumers and do not affect the library's MSRV guarantee.
https://github.com/synesissoftware/libpath.Rust.
Dependencies
Efferent (fan-out)
Libraries upon which libpath.Rust depends:
Runtime Dependencies
- FastParse.Rust —
provides the public
PositionalSliceresult type;
Build Dependencies
None.
Development Dependencies
- test_help-rs — declared for repository test support;
Afferent (fan-in)
No downstream consumers are currently recorded.
Related projects
License
libpath.Rust is released under the 3-clause BSD license. See LICENSE for details.