Open templateK opened 10 months ago
Similar-ish to this one https://github.com/tauri-apps/tauri/issues/4724#issuecomment-1548974637 (Only commenting this so we fix both at the same time).
p.s. thanks for the report. and using cargo run
in the meantime is fine btw, for simple apps the only thing you'll loose is the beforeDevCommand
which you can just run in a seperate terminal yourself. What i mean is that there shouldn't be any noteworthy runtime consequences (again, for simple apps, once you add sidecars and resources etc it can get tricky).
Describe the bug
If you set environment variable through cargo
config.toml
file, like below,cargo tauri dev
doesn't add it to the target app..cargo/config.toml
Reproduction
preprare barebone tauri-app
edit tauri-app/src-tauri/src/main.rs
[tauri::command]
fn greet(name: &str) -> String { format!("Hello, {}! You've been greeted from Rust!", name) }
fn main() {
}
cargo tauri dev
Expected behavior
Running command
cargo tauri dev
should print below.Platform and versions
Stack trace
No response
Additional context
If we run tauri-app by running command
cd src-tauri; cargo run
, the app correctly prints the environment variable set by.cargo/config.toml
.