Skip to content

Commit ed43e23

Browse files
beneschkhuey
authored andcommitted
Drop dependency on glob
A minor refactor to the build script eliminates the dependency on glob, which is nice for folks downstream who are trying to keep their dependency load light.
1 parent a18ca01 commit ed43e23

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ name = "afl_runner"
2222
path = "src/bin/afl_runner.rs"
2323
required-features = ["afl"]
2424

25-
[build-dependencies]
26-
glob = "0.3.0"
27-
2825
[dependencies]
2926
cfg-if = "1.0.0"
3027

build.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
extern crate glob;
2-
3-
use glob::glob;
41
use std::collections::HashSet;
52
use std::env;
63
use std::fs;
74
use std::io::{self, BufRead, Write};
8-
use std::path;
5+
use std::path::{self, Path};
96

107
fn get_crate_dir() -> io::Result<path::PathBuf> {
118
Ok(path::PathBuf::from(
@@ -59,11 +56,6 @@ use std::io::Read;
5956
"
6057
)?;
6158

62-
for entry in glob("./in/*").expect("should read glob pattern") {
63-
if let Ok(path) = entry {
64-
println!("cargo:rerun-if-changed={}", path.display());
65-
}
66-
}
6759
println!("cargo:rerun-if-changed=tests/afl_seeds.rs");
6860

6961
let entries = fs::read_dir(in_dir)?;
@@ -78,6 +70,7 @@ use std::io::Read;
7870
"no file name for AFL.rs seed test case",
7971
)
8072
})?;
73+
println!("cargo:rerun-if-changed=in/{}", Path::new(file_name).display());
8174

8275
writeln!(
8376
&mut test_file,

0 commit comments

Comments
 (0)