pub struct ComponentBuildConfig {
pub command: Commands,
pub workdir: Option<String>,
pub watch: Vec<String>,
}
Expand description
Component build configuration
Fields§
§command: Commands
The command or commands to build the application. If multiple commands are specified, they are run sequentially from left to right.
Example: command = "cargo build"
, command = ["npm install", "npm run build"]
Learn more: https://spinframework.dev/build#setting-up-for-spin-build
workdir: Option<String>
The working directory for the build command. If omitted, the build working
directory is the directory containing spin.toml
.
Example: `workdir = “components/main”
Learn more: https://spinframework.dev/build#overriding-the-working-directory
watch: Vec<String>
Source files to use in spin watch
. This is a set of paths or glob patterns (relative
to the build working directory). A change to any matching file causes
spin watch
to rebuild the application before restarting the application.
Example: watch = ["src/**/*.rs"]
Learn more: https://spinframework.dev/running-apps#monitoring-applications-for-changes
Implementations§
Source§impl ComponentBuildConfig
impl ComponentBuildConfig
Sourcepub fn commands(&self) -> impl ExactSizeIterator<Item = &String>
pub fn commands(&self) -> impl ExactSizeIterator<Item = &String>
The commands to execute for the build
Trait Implementations§
Source§impl Clone for ComponentBuildConfig
impl Clone for ComponentBuildConfig
Source§fn clone(&self) -> ComponentBuildConfig
fn clone(&self) -> ComponentBuildConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ComponentBuildConfig
impl Debug for ComponentBuildConfig
Source§impl<'de> Deserialize<'de> for ComponentBuildConfig
impl<'de> Deserialize<'de> for ComponentBuildConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ComponentBuildConfig
impl JsonSchema for ComponentBuildConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more