1use serde::Deserialize;
2use serde_json::Value;
3use std::collections::HashMap;
4use std::path::PathBuf;
5
6#[derive(Debug, Deserialize)]
7pub struct Metadata {
8 pub packages: Vec<Package>,
9 pub workspace_root: PathBuf,
10}
11
12#[derive(Debug, Deserialize)]
13pub struct Package {
14 pub name: String,
15 pub version: String,
16 pub metadata: Value,
17 pub targets: Vec<Target>,
18}
19
20#[derive(Debug, Deserialize)]
21pub struct Target {
22 pub name: String,
23 #[serde(rename = "kind")]
24 pub kinds: Vec<String>,
25}
26
27#[derive(Debug, Deserialize)]
28pub struct MakefileToml {
29 pub tasks: HashMap<String, Task>,
30}
31
32#[derive(Debug, Deserialize)]
33pub struct Task {
34 pub script: Option<Vec<String>>,
35 pub command: Option<String>,
36 pub args: Option<Vec<String>>,
37 pub dependencies: Option<Vec<String>>,
38}