7 stable releases

new 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

#205 in Build Utils

Download history 37798/week @ 2024-01-10 38336/week @ 2024-01-17 45293/week @ 2024-01-24 47912/week @ 2024-01-31 47912/week @ 2024-02-07 41509/week @ 2024-02-14 43485/week @ 2024-02-21 43648/week @ 2024-02-28 46476/week @ 2024-03-06 48973/week @ 2024-03-13 48865/week @ 2024-03-20 47964/week @ 2024-03-27 47420/week @ 2024-04-03 46123/week @ 2024-04-10 46509/week @ 2024-04-17 17872/week @ 2024-04-24

165,077 downloads per month
Used in 25 crates (5 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