tauri_utils::config::parse

Function read_from

Source
pub fn read_from(
    target: Target,
    root_dir: PathBuf,
) -> Result<(Value, Option<PathBuf>), ConfigError>
Expand description

Reads the configuration from the given root directory.

It first looks for a tauri.conf.json[5] or Tauri.toml file on the given directory. The file must exist. Then it looks for a platform-specific configuration file:

  • tauri.macos.conf.json[5] or Tauri.macos.toml on macOS
  • tauri.linux.conf.json[5] or Tauri.linux.toml on Linux
  • tauri.windows.conf.json[5] or Tauri.windows.toml on Windows
  • tauri.android.conf.json[5] or Tauri.android.toml on Android
  • tauri.ios.conf.json[5] or Tauri.ios.toml on iOS Merging the configurations using JSON Merge Patch (RFC 7396).

Returns the raw configuration and the platform config path, if any.