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

#222 in Build Utils

Download history 47056/week @ 2024-04-04 46687/week @ 2024-04-11 44457/week @ 2024-04-18 17773/week @ 2024-04-25 13716/week @ 2024-05-02 14457/week @ 2024-05-09 12962/week @ 2024-05-16 12873/week @ 2024-05-23 13023/week @ 2024-05-30 11330/week @ 2024-06-06 8959/week @ 2024-06-13 10235/week @ 2024-06-20 8774/week @ 2024-06-27 7279/week @ 2024-07-04 8513/week @ 2024-07-11 7382/week @ 2024-07-18

33,831 downloads per month
Used in 28 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