[M8] cargoxx-git dependencies: { git = ..., rev = ... } deps

This commit is contained in:
2026-05-17 18:31:13 +00:00
parent e6c39914b3
commit 09f151ad82
12 changed files with 310 additions and 28 deletions

View File

@@ -8,6 +8,7 @@ export namespace cargoxx::manifest {
enum class DepSource {
Auto, // string form or { version = ... } only → existing resolver chain
CargoxxPath, // { path = "../foo" } → recursive cargoxx build
CargoxxGit, // { git = "...", rev = "..." } → fetch + recursive cargoxx build
};
struct Dependency {
@@ -15,7 +16,9 @@ struct Dependency {
std::string version_spec;
std::vector<std::string> components;
DepSource source = DepSource::Auto;
std::optional<std::string> path; // when source == CargoxxPath
std::optional<std::string> path; // when source == CargoxxPath
std::optional<std::string> git_url; // when source == CargoxxGit
std::optional<std::string> git_rev; // when source == CargoxxGit (40-char)
bool operator==(const Dependency&) const = default;
};