npmgen-core 0.3.1

Library that generates the npm publish tree shipping a prebuilt Rust binary.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::Deserialize;

/// A user-declared target. `key` is the npm platform key (`<os>-<cpu>`); the
/// Rust `triple` and the npm `os`/`cpu` filters are derived from `key` when
/// omitted, and overridable per entry.
#[derive(Debug, Clone, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct TargetSpec {
    pub key: String,
    #[serde(default)]
    pub triple: Option<String>,
    #[serde(default)]
    pub os: Option<String>,
    #[serde(default)]
    pub cpu: Option<String>,
}