Function tauri_build::build[][src]

pub fn build()
Expand description

Run all build time helpers for your Tauri Application.

The current helpers include the following:

  • Generates a Windows Resource file when targeting Windows.

Platforms

build() should be called inside of build.rs regardless of the platform:

  • New helpers may target more platforms in the future.
  • Platform specific code is handled by the helpers automatically.
  • A build script is required in order to activate some cargo environmental variables that are used when generating code and embedding assets - so build() may as well be called.

In short, this is saying don’t put the call to build() behind a #[cfg(windows)].

Panics

If any of the build time helpers fail, they will std::panic! with the related error message. This is typically desirable when running inside a build script; see try_build for no panics.