npmgen_core/config/target_spec.rs
1use serde::Deserialize;
2
3/// A user-declared target. `key` is the npm platform key (`<os>-<cpu>`); the
4/// Rust `triple` and the npm `os`/`cpu` filters are derived from `key` when
5/// omitted, and overridable per entry.
6#[derive(Debug, Clone, Deserialize)]
7#[serde(deny_unknown_fields)]
8pub struct TargetSpec {
9 pub key: String,
10 #[serde(default)]
11 pub triple: Option<String>,
12 #[serde(default)]
13 pub os: Option<String>,
14 #[serde(default)]
15 pub cpu: Option<String>,
16}