#git #origin #root #project

project-origins

Resolve project origins and kinds from a path

8 stable releases

1.4.1 Feb 9, 2025
1.4.0 Apr 28, 2024
1.3.0 Jan 1, 2024
1.2.1 Nov 26, 2023
1.0.0 Jun 16, 2022

#1360 in Filesystem

Download history 11061/week @ 2024-12-07 8595/week @ 2024-12-14 3357/week @ 2024-12-21 4959/week @ 2024-12-28 10410/week @ 2025-01-04 9538/week @ 2025-01-11 8074/week @ 2025-01-18 11763/week @ 2025-01-25 10165/week @ 2025-02-01 11774/week @ 2025-02-08 11004/week @ 2025-02-15 10236/week @ 2025-02-22 8764/week @ 2025-03-01 8430/week @ 2025-03-08 12530/week @ 2025-03-15 11529/week @ 2025-03-22

43,375 downloads per month
Used in 35 crates (7 directly)

Apache-2.0

16KB
241 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