flowey_lib_common/_util/cargo_output.rs
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Type definitions for the output of `cargo build --message-format=json`.
5
6use serde::Deserialize;
7use std::path::PathBuf;
8
9#[derive(Deserialize, Debug)]
10#[serde(tag = "reason")]
11pub enum Message {
12 #[serde(rename = "compiler-artifact")]
13 CompilerArtifact {
14 target: Target,
15 filenames: Vec<PathBuf>,
16 },
17 #[serde(other)]
18 Other,
19}
20
21#[derive(Deserialize, Debug)]
22pub struct Target {
23 pub kind: Vec<String>,
24 pub name: String,
25}