Skip to content

Commit bfd3894

Browse files
committed
Cleanup build.rs
Fix compilation issues on windows
1 parent 7cd2084 commit bfd3894

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

rust/build.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,12 @@
22
// Copyright (c) 2023-2024 Rust Nostr Developers
33
// Distributed under the MIT software license
44

5-
use std::process::{Command, Stdio};
6-
75
use lib_flutter_rust_bridge_codegen::codegen;
86
use lib_flutter_rust_bridge_codegen::codegen::Config;
97

108
fn main() {
119
println!("cargo:rerun-if-changed=src/api");
1210

13-
if !is_dart_installed() {
14-
panic!("Warning: dart not installed.");
15-
}
16-
17-
if !is_flutter_installed() {
18-
panic!("Warning: flutter not installed.");
19-
}
20-
2111
// Execute code generator with auto-detected config
2212
codegen::generate(
2313
Config::from_config_file("../flutter_rust_bridge.yaml")
@@ -27,21 +17,3 @@ fn main() {
2717
)
2818
.unwrap();
2919
}
30-
31-
fn is_dart_installed() -> bool {
32-
let output = Command::new("dart")
33-
.arg("--version")
34-
.stdout(Stdio::null())
35-
.stderr(Stdio::null())
36-
.status();
37-
matches!(output, Ok(status) if status.success())
38-
}
39-
40-
fn is_flutter_installed() -> bool {
41-
let output = Command::new("flutter")
42-
.arg("--version")
43-
.stdout(Stdio::null())
44-
.stderr(Stdio::null())
45-
.status();
46-
matches!(output, Ok(status) if status.success())
47-
}

0 commit comments

Comments
 (0)