Struct tauri_utils::config::BuildConfig
source · [−]pub struct BuildConfig {
pub runner: Option<String>,
pub dev_path: AppUrl,
pub dist_dir: AppUrl,
pub before_dev_command: Option<String>,
pub before_build_command: Option<String>,
pub features: Option<Vec<String>>,
pub with_global_tauri: bool,
}
Expand description
The Build configuration object.
Fields
runner: Option<String>
The binary used to build and run the application.
dev_path: AppUrl
The path to the application assets or URL to load in development.
This is usually an URL to a dev server, which serves your application assets with live reloading. Most modern JavaScript bundlers provides a way to start a dev server by default.
See vite, Webpack DevServer and sirv for examples on how to set up a dev server.
dist_dir: AppUrl
The path to the application assets or URL to load in production.
When a path relative to the configuration file is provided,
it is read recursively and all files are embedded in the application binary.
Tauri then looks for an index.html
file unless you provide a custom window URL.
You can also provide a list of paths to be embedded, which allows granular control over what files are added to the binary. In this case, all files are added to the root and you must reference it that way in your HTML files.
When an URL is provided, the application won’t have bundled assets and the application will load that URL by default.
before_dev_command: Option<String>
A shell command to run before tauri dev
kicks in.
The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
before_build_command: Option<String>
A shell command to run before tauri build
kicks in.
The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
features: Option<Vec<String>>
Features passed to cargo
commands.
with_global_tauri: bool
Whether we should inject the Tauri API on window.__TAURI__
or not.
Trait Implementations
sourceimpl Clone for BuildConfig
impl Clone for BuildConfig
sourcefn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BuildConfig
impl Debug for BuildConfig
sourceimpl Default for BuildConfig
impl Default for BuildConfig
sourceimpl<'de> Deserialize<'de> for BuildConfig
impl<'de> Deserialize<'de> for BuildConfig
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<BuildConfig> for BuildConfig
impl PartialEq<BuildConfig> for BuildConfig
sourcefn eq(&self, other: &BuildConfig) -> bool
fn eq(&self, other: &BuildConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BuildConfig) -> bool
fn ne(&self, other: &BuildConfig) -> bool
This method tests for !=
.
sourceimpl Serialize for BuildConfig
impl Serialize for BuildConfig
impl Eq for BuildConfig
impl StructuralEq for BuildConfig
impl StructuralPartialEq for BuildConfig
Auto Trait Implementations
impl RefUnwindSafe for BuildConfig
impl Send for BuildConfig
impl Sync for BuildConfig
impl Unpin for BuildConfig
impl UnwindSafe for BuildConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more