7 stable releases

1.4.0 Apr 28, 2024
1.3.0 Jan 1, 2024
1.2.1 Nov 26, 2023
1.2.0 Jan 8, 2023
1.0.0 Jun 16, 2022

#280 in Build Utils

Download history 9142/week @ 2024-08-04 9238/week @ 2024-08-11 9791/week @ 2024-08-18 9510/week @ 2024-08-25 9026/week @ 2024-09-01 8924/week @ 2024-09-08 9315/week @ 2024-09-15 12691/week @ 2024-09-22 9847/week @ 2024-09-29 5649/week @ 2024-10-06 8407/week @ 2024-10-13 7625/week @ 2024-10-20 8033/week @ 2024-10-27 8789/week @ 2024-11-03 11450/week @ 2024-11-10 8189/week @ 2024-11-17

36,755 downloads per month
Used in 32 crates (6 directly)

Apache-2.0

15KB
235 lines

Crates.io page API Docs Crate license: Apache 2.0 CI status

Project origins

Resolve project origins and kinds from a path.


lib.rs:

Resolve project origins and kinds from a path.

This crate originated in Watchexec: it is used to resolve where a project's origin (or root) is, starting either at that origin, or within a subdirectory of it.

This crate also provides the kind of project it is, and defines two categories within this: version control systems, and software development environments.

As it is possible to find several project origins, of different or similar kinds, from a given directory and walking up, origins returns a set, rather than a single path. Determining which of these is the "one true origin" (if necessary) is left to the caller.

Dependencies

~2.7–8.5MB
~64K SLoC