38 lines
773 B
C++
38 lines
773 B
C++
export module cargoxx.manifest;
|
|
|
|
import std;
|
|
import cargoxx.util;
|
|
|
|
export namespace cargoxx::manifest {
|
|
|
|
struct Dependency {
|
|
std::string name;
|
|
std::string version_spec;
|
|
std::vector<std::string> components;
|
|
};
|
|
|
|
struct BuildSettings {
|
|
bool warnings_as_errors = false;
|
|
std::vector<std::string> sanitizers;
|
|
};
|
|
|
|
enum class Edition { Cpp20, Cpp23, Cpp26 };
|
|
|
|
struct Package {
|
|
std::string name;
|
|
std::string version;
|
|
Edition edition = Edition::Cpp23;
|
|
std::vector<std::string> authors;
|
|
std::optional<std::string> license;
|
|
};
|
|
|
|
struct Manifest {
|
|
Package package;
|
|
std::vector<Dependency> dependencies;
|
|
BuildSettings build;
|
|
};
|
|
|
|
auto parse(const std::filesystem::path& path) -> util::Result<Manifest>;
|
|
|
|
} // namespace cargoxx::manifest
|