6 stable releases

1.3.0 Jan 1, 2024
1.2.1 Nov 26, 2023
1.2.0 Jan 8, 2023
1.1.1 Sep 7, 2022
1.0.0 Jun 16, 2022

#221 in Build Utils

Download history 36719/week @ 2023-12-22 35639/week @ 2023-12-29 35830/week @ 2024-01-05 38927/week @ 2024-01-12 39371/week @ 2024-01-19 46580/week @ 2024-01-26 47910/week @ 2024-02-02 47090/week @ 2024-02-09 41472/week @ 2024-02-16 43458/week @ 2024-02-23 44183/week @ 2024-03-01 46086/week @ 2024-03-08 49673/week @ 2024-03-15 49629/week @ 2024-03-22 47046/week @ 2024-03-29 40136/week @ 2024-04-05

193,247 downloads per month
Used in 25 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–4MB
~64K SLoC