foundry_config/external_compiler.rs
1use serde::{Deserialize, Serialize};
2use serde_json::{Map, Value};
3use std::path::PathBuf;
4
5/// Configuration for an external compiler adapter executable.
6#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
7pub struct ExternalCompiler {
8 /// Stable user-defined identifier used to namespace cache and artifact entries.
9 pub id: String,
10 /// Absolute or project-relative adapter executable path.
11 pub command: PathBuf,
12 /// Arguments passed to the adapter executable.
13 #[serde(default, skip_serializing_if = "Vec::is_empty")]
14 pub args: Vec<String>,
15 /// Compiler-native project roots, relative to the Foundry project root.
16 pub roots: Vec<PathBuf>,
17 /// Opaque adapter-specific settings.
18 #[serde(default, skip_serializing_if = "Map::is_empty")]
19 pub settings: Map<String, Value>,
20}