pub struct BuildConfig {
pub runner: Option<String>,
pub dev_url: Option<Url>,
pub frontend_dist: Option<FrontendDist>,
pub before_dev_command: Option<BeforeDevCommand>,
pub before_build_command: Option<HookCommand>,
pub before_bundle_command: Option<HookCommand>,
pub features: Option<Vec<String>>,
}
Expand description
The Build configuration object.
See more: https://v2.tauri.app/reference/config/#buildconfig
Fields§
§runner: Option<String>
The binary used to build and run the application.
dev_url: Option<Url>
The URL to load in development.
This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR. Most modern JavaScript bundlers like vite provides a way to start a dev server by default.
If you don’t have a dev server or don’t want to use one, ignore this option and use frontendDist
and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.
frontend_dist: Option<FrontendDist>
The path to the application assets (usually the dist
folder of your javascript bundler)
or a URL that could be either a custom protocol registered in the tauri app (for example: myprotocol://
)
or a remote URL (for example: https://site.com/app
).
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
and serves it as the default entry point for your application.
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 a URL is provided, the application won’t have bundled assets and the application will load that URL by default.
before_dev_command: Option<BeforeDevCommand>
A shell command to run before tauri dev
kicks in.
The TAURI_ENV_PLATFORM, TAURI_ENV_ARCH, TAURI_ENV_FAMILY, TAURI_ENV_PLATFORM_VERSION, TAURI_ENV_PLATFORM_TYPE and TAURI_ENV_DEBUG environment variables are set if you perform conditional compilation.
before_build_command: Option<HookCommand>
A shell command to run before tauri build
kicks in.
The TAURI_ENV_PLATFORM, TAURI_ENV_ARCH, TAURI_ENV_FAMILY, TAURI_ENV_PLATFORM_VERSION, TAURI_ENV_PLATFORM_TYPE and TAURI_ENV_DEBUG environment variables are set if you perform conditional compilation.
before_bundle_command: Option<HookCommand>
A shell command to run before the bundling phase in tauri build
kicks in.
The TAURI_ENV_PLATFORM, TAURI_ENV_ARCH, TAURI_ENV_FAMILY, TAURI_ENV_PLATFORM_VERSION, TAURI_ENV_PLATFORM_TYPE and TAURI_ENV_DEBUG environment variables are set if you perform conditional compilation.
features: Option<Vec<String>>
Features passed to cargo
commands.
Trait Implementations§
Source§impl Clone for BuildConfig
impl Clone for BuildConfig
Source§fn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BuildConfig
impl Debug for BuildConfig
Source§impl Default for BuildConfig
impl Default for BuildConfig
Source§fn default() -> BuildConfig
fn default() -> BuildConfig
Source§impl<'de> Deserialize<'de> for BuildConfig
impl<'de> Deserialize<'de> for BuildConfig
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 PartialEq for BuildConfig
impl PartialEq for BuildConfig
Source§impl Serialize for BuildConfig
impl Serialize for BuildConfig
impl Eq for BuildConfig
impl StructuralPartialEq for BuildConfig
Auto Trait Implementations§
impl Freeze for BuildConfig
impl RefUnwindSafe for BuildConfig
impl Send for BuildConfig
impl Sync for BuildConfig
impl Unpin for BuildConfig
impl UnwindSafe for BuildConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.