microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
flowey/flowey_lib_common/src/_util/cargo_output.rs
25lines · modecode
| 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 | |
| 6 | use serde::Deserialize; |
| 7 | use std::path::PathBuf; |
| 8 | |
| 9 | #[derive(Deserialize, Debug)] |
| 10 | #[serde(tag = "reason")] |
| 11 | pub 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)] |
| 22 | pub struct Target { |
| 23 | pub kind: Vec<String>, |
| 24 | pub name: String, |
| 25 | } |
| 26 | |