Skip to content

Commit

Permalink
feat: add makefile for scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
gongzhengyang committed Oct 31, 2023
1 parent cbc6f64 commit 94ecdcb
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ repository = "https://github.com/gongzhengyang/rscan"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "4", features = ["derive"] }
console-subscriber = "0.2"
pnet = "0.34"
rscanner = { path = "rscanner" }
tokio = { version = "1", features = ["full", "tracing"]}
tokio = { version = "1", features = ["full", "tracing"] }
tracing = "0.1"
tracing-subscriber = "0.3"
clap = { version = "4.2", features = ["derive"] }
pnet = "0.33"
console-subscriber = "0.1.9"

[workspace]
members = [".", "rscanner"]
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export VERSION=$(shell head Cargo.toml -n 3 | tail -n 1| awk '{ print $$3}' | sed 's/"//g')
export RUSTFLAGS=--cfg tokio_unstable -C target-feature=+crt-static

.PHONY: all
all: linux freebsd android macos-intel macos-arm

.PHONY: linux
linux:
ARCH=x86_64-unknown-linux-musl bash build-release.sh
Expand All @@ -26,5 +29,9 @@ macos-intel:
macos-arm:
ARCH=aarch64-apple-darwin CARGO_PROFILE_RELEASE_STRIP=false bash build-release.sh

.PHONY: all
all: linux freebsd android macos-intel macos-arm
.PHONY: check
check:
cargo fmt
cargo tomlfmt
cargo install --locked cargo-outdated
cargo outdated -R
22 changes: 10 additions & 12 deletions rscanner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ repository = "https://github.com/gongzhengyang/rscan"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
tokio = { version = "1", features = ["full", "tracing"] }
anyhow = "1.0.71"
pnet = "0.33"
pnet_transport = "0.33"
rand = "0.8"
chrono = "0.4"
serde = { version = "1", features = ["derive"]}
serde_json = "1"
rlimit = "0.9"
async-trait = "0.1"
clap = { version = "4.2", features = ["derive"] }
hashbrown = "0.14"
ipnetwork = "0.20"
tracing = "0.1"
async-trait = "0.1"
hashbrown = "0.13"
itertools = "0.10"
itertools = "0.11"
pnet = "0.34"
pnet_transport = "0.34"
rand = "0.8"
rlimit = "0.10"
serde = { version = "1", features = ["derive"] }
thiserror = "1.0"
tokio = { version = "1", features = ["full", "tracing"] }
tracing = "0.1"
9 changes: 9 additions & 0 deletions rscanner/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.PHONY: check
check:
cargo fmt
cargo tomlfmt
cargo clippy --all-targets
cargo install --locked cargo-outdated
cargo outdated -R
cargo install cargo-udeps --locked
cargo +nightly udeps
1 change: 0 additions & 1 deletion rscanner/src/setting/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ mod tests {
let cidr_start = u32::from(Ipv4Addr::from_str("1.1.1.0").unwrap());
compare.extend(
(0..256)
.into_iter()
.map(|x| Ipv4Addr::from(x + cidr_start))
.collect::<Vec<Ipv4Addr>>(),
);
Expand Down

0 comments on commit 94ecdcb

Please sign in to comment.