forked from rust-nostr/nostr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
executable file
·76 lines (57 loc) · 1.6 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env just --justfile
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
default:
@just --list
# Build nostr CLI (release)
cli:
cargo build -p nostr-cli --release
# Execute a partial check (MSRV is not checked)
precommit:
@bash contrib/scripts/precommit.sh
# Execute a full check
check:
@bash contrib/scripts/check.sh
# 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 all the bindings
check-bindings:
@bash contrib/scripts/check-bindings.sh
# Check the book snippets
check-book:
@bash contrib/scripts/check-book.sh
# Check all the crates
check-crates:
@bash contrib/scripts/check-crates.sh
# Check MSRV of all the crates
check-crates-msrv:
@bash contrib/scripts/check-crates.sh msrv
# Check Rust docs
check-docs:
@bash contrib/scripts/check-docs.sh
# Release rust crates
[confirm]
release:
@bash contrib/scripts/release.sh
# Run benches (unstable)
bench:
RUSTFLAGS='--cfg=bench' cargo +nightly bench -p nostr
# Check cargo duplicate dependencies
dup:
cargo tree -d
# Remove artifacts that cargo has generated
clean:
cargo clean
# Build and serve the book
book:
cd book && just serve
# Get many-events.json to test database performance
many-events:
curl https://cdn.jb55.com/s/many-events.json.zst -o many-events.json.zst
zstd -d many-events.json.zst
# 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