forked from rust-nostr/nostr-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
37 lines (28 loc) · 780 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
default: build
# Build (release)
build:
cargo build --release
bench:
ab -n 100000 -c 16 -k -r -t 60 http://127.0.0.1:7773/ping
# Check format and crates
check: check-fmt check-crate
# Format the code and execute some checks
precommit: fmt
cargo check
cargo test
cargo clippy
# Format the entire Rust code
fmt:
@bash contrib/scripts/check-fmt.sh
# Check if the Rust code is formatted
check-fmt:
@bash contrib/scripts/check-fmt.sh check
# Check crate
check-crate:
@bash contrib/scripts/check-crate.sh
# Remove artifacts that cargo has generated
clean:
cargo clean
# Count the lines of codes of this project
loc:
@echo "--- Counting lines of .rs files (LOC):" && find crates/ bindings/ -type f -name "*.rs" -not -path "*/target/*" -exec cat {} \; | wc -l