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

#197 in Build Utils

Download history 9534/week @ 2024-08-24 8781/week @ 2024-08-31 9203/week @ 2024-09-07 9112/week @ 2024-09-14 12600/week @ 2024-09-21 10046/week @ 2024-09-28 5697/week @ 2024-10-05 8390/week @ 2024-10-12 7787/week @ 2024-10-19 7827/week @ 2024-10-26 8825/week @ 2024-11-02 11325/week @ 2024-11-09 8690/week @ 2024-11-16 8320/week @ 2024-11-23 9901/week @ 2024-11-30 9438/week @ 2024-12-07

38,460 downloads per month
Used in 33 crates (7 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