sudo /Applications/zkVot.app/Contents/MacOS/zkvot-app
stderr:
stderr: #
stderr: # Fatal process OOM in Failed to reserve virtual memory for CodeRange
stderr: #
stderr:
terminated: None
This is the output i got when i run the builded app. This is how my lib.rs looks:
use tauri_plugin_shell::process::CommandEvent;
use tauri_plugin_shell::ShellExt;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.setup(|app| {
let sidecar_command = app
.shell()
.sidecar("zkvot-desktop")
.expect("failed to create sidecar");
let (mut rx, mut _child) = sidecar_command.spawn().expect("failed to spawn sidecar");
tauri::async_runtime::spawn(async move {
while let Some(event) = rx.recv().await {
match event {
CommandEvent::Stdout(line_bytes) => {
let line = String::from_utf8_lossy(&line_bytes);
println!("stdout: {}", line);
}
CommandEvent::Stderr(line_bytes) => {
let line = String::from_utf8_lossy(&line_bytes);
println!("stderr: {}", line);
}
CommandEvent::Error(exit_status) => {
println!("exit: {}", exit_status);
break;
}
CommandEvent::Terminated(payload) => {
println!("terminated: {:?}", payload.code);
break;
}
_ => {}
}
}
});
Ok(())
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
And the sidecar is working well when i run it manually and when run in cargo tauri dev.