pub struct Argument {
pub Directory: String,
pub Name: String,
pub Prefix: String,
pub Browser: Option<String>,
pub Bundle: Option<String>,
pub Compile: Option<String>,
pub Clean: Option<String>,
pub Debug: Option<String>,
pub Dependency: Option<String>,
pub Environment: Option<String>,
pub NodeVersion: Option<String>,
pub Command: Vec<String>,
}Expand description
Represents parsed command-line arguments and environment variables that control the build.
This struct is generated by clap from the Parser derive macro and
automatically parses command-line arguments and environment variables into
a strongly-typed configuration object. Each field can be configured via:
- Command-line arguments (long form, e.g.,
--directory) - Environment variables (as specified in the
envattribute) - Default values (as specified in the
default_valueattribute)
Required fields must be provided, while optional fields can be omitted.
The Command field is special in that it accepts all remaining arguments
as the build command to execute.
§Field Descriptions
- Directory: The main directory of the project containing Cargo.toml
- Name: The original base name of the project/package
- Prefix: The prefix for the application’s bundle identifier
- Browser: Flag for browser-specific build aspects
- Bundle: Flag for bundling-specific aspects
- Compile: Flag for compile-specific aspects
- Clean: Flag for cleaning-specific aspects
- Debug: Flag for debug-specific aspects
- Dependency: Information about a dependency (org/repo or boolean)
- Environment: The Node.js environment (development, production, etc.)
- NodeVersion: The Node.js sidecar version to bundle
- Command: The build command and its arguments to execute
Fields§
§Directory: StringThe main directory of the project.
This field specifies the project directory that contains the
Cargo.toml and tauri.conf.json files. It can be set via:
- Command-line:
--directory <path> - Environment:
MOUNTAIN_DIR - Default: “Element/Mountain”
Name: StringThe original base name of the project/package.
This field specifies the base name of the project, which serves as the suffix for generated product names. It can be set via:
- Command-line:
--name <name> - Environment:
MOUNTAIN_ORIGINAL_BASE_NAME - Default: “Mountain”
Prefix: StringThe prefix for the application’s bundle identifier.
This field specifies the reverse domain prefix for the bundle identifier. It can be set via:
- Command-line:
--prefix <prefix> - Environment:
MOUNTAIN_BUNDLE_ID_PREFIX - Default: “land.editor.binary”
Browser: Option<String>Flag or value indicating browser-specific build aspects.
When set to “true”, enables browser-specific configuration and affects the generated product name and bundle identifier.
Bundle: Option<String>Flag or value indicating bundling-specific aspects.
When set to “true”, enables bundling-specific configuration and affects the generated product name and bundle identifier.
Compile: Option<String>Flag or value indicating compile-specific aspects.
When set to “true”, enables compile-specific configuration and affects the generated product name and bundle identifier.
Clean: Option<String>Flag or value indicating cleaning-specific aspects.
When set to “true”, enables clean-specific configuration and affects the generated product name and bundle identifier.
Debug: Option<String>Flag or value indicating debug-specific aspects.
When set to “true”, enables debug-specific configuration and affects the generated product name and bundle identifier. Also automatically detected if the command contains “–debug”.
Dependency: Option<String>Information about a dependency, often ‘org/repo’ or a boolean string.
This field specifies dependency information that affects the generated product name and bundle identifier. Can be:
- “true” for generic dependencies
- “org/repo” for specific repository dependencies
- Any custom string
Environment: Option<String>The Node.js environment (e.g., “development”, “production”).
This field specifies the Node.js runtime environment and affects the generated product name and bundle identifier.
NodeVersion: Option<String>Specifies the Node.js sidecar version to bundle (e.g., “22”).
This field specifies which Node.js version should be bundled as a sidecar binary with the application. The executable is sourced from the Element/SideCar directory.
Command: Vec<String>The build command and its arguments to execute.
This field accepts all remaining command-line arguments as the build command to execute after configuring the project files. This field is required and must be provided as the final arguments.
Example: pnpm tauri build
Trait Implementations§
Source§impl Args for Argument
impl Args for Argument
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for Argument
impl FromArgMatches for Argument
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.