adds zebrad as a bundled external binary (#4)
Co-authored-by: Automated Release Test <release-tests-no-reply@zfnd.org>
This commit is contained in:
parent
726beaf3ee
commit
fd589615ef
Binary file not shown.
|
@ -10,11 +10,9 @@ use std::{
|
|||
|
||||
use tauri::{AppHandle, Manager, RunEvent};
|
||||
|
||||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||
// TODO: Add a command for updating the config and restarting `zebrad` child process
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
fn save_config() {}
|
||||
|
||||
fn main() {
|
||||
// Spawn initial zebrad process
|
||||
|
@ -27,6 +25,9 @@ fn main() {
|
|||
// Spawn a task for reading output and sending it to a channel
|
||||
let (zebrad_log_sender, mut zebrad_log_receiver) = tokio::sync::mpsc::channel(100);
|
||||
let zebrad_stdout = zebrad.stdout.take().expect("should have anonymous pipe");
|
||||
|
||||
// TODO: Use a blocking tokio/async_runtime thread? The io is blocking (reading the child process output from stdio), so
|
||||
// it shouldn't use a green thread
|
||||
let _log_emitter_handle = std::thread::spawn(move || {
|
||||
for line in BufReader::new(zebrad_stdout).lines() {
|
||||
// Ignore send errors for now
|
||||
|
@ -48,7 +49,7 @@ fn main() {
|
|||
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.invoke_handler(tauri::generate_handler![save_config])
|
||||
.build(tauri::generate_context!())
|
||||
.unwrap()
|
||||
.run(move |app_handle: &AppHandle, _event| {
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{
|
||||
"productName": "zebra-app",
|
||||
"version": "0.0.0",
|
||||
"identifier": "com.tauri.dev",
|
||||
"identifier": "zebra.app",
|
||||
"build": {
|
||||
"beforeDevCommand": "yarn dev",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"beforeBuildCommand": "yarn build",
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
"app": {"windows": [
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "zebra-app",
|
||||
"width": 800,
|
||||
|
@ -28,6 +29,7 @@
|
|||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
],
|
||||
"externalBin": ["binaries/zebrad"]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue