forked from whamcloud/simple-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
86 lines (61 loc) · 2.45 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
77
78
79
80
81
82
83
84
85
86
# clean
clean:
cargo clean
check-with-tests:
cargo check --workspace --tests
build-with-tests:
cargo build --workspace --tests
build:
cargo build --workspace
udeps:
cargo +nightly udeps --workspace
build-chatty-types:
cd chatty-types && \
cargo build --package chatty-types
build-chatty-tcp:
cd chatty-tcp && \
cargo build --package chatty-tcp
# watching builds
watch-build:
cargo watch -x "build --workspace"
watch-build-with-tests:
cargo watch -x "build --workspace --tests"
watch-build-chatty-types:
cd chatty-types && \
cargo watch -x "build --package chatty-types"
watch-build-chatty-tcp:
cd chatty-tcp && \
cargo watch -x "build --package chatty-tcp"
# .cargo/cargo.toml has TCP_SERVER_ADDRESS AND TCP_SERVER_PORT and we can overrride it here as needed if needed
# run only
# server
run-chatty-tcp-server:
TCP_SERVER_ADDRESS="localhost" TCP_SERVER_PORT="8081" cargo run --package chatty-tcp --bin server
run-chatty-tcp-client-cmd-help:
cargo run --package chatty-tcp --bin client -- --help
run-chatty-tcp-client-join-no-username:
TCP_SERVER_ADDRESS="localhost" TCP_SERVER_PORT="8081" cargo run --quiet --package chatty-tcp --bin client
run-chatty-tcp-client-carl-join:
TCP_SERVER_ADDRESS="localhost" TCP_SERVER_PORT="8081" cargo run --quiet --package chatty-tcp --bin client -- --username "carl"
run-chatty-tcp-client-david-join:
TCP_SERVER_ADDRESS="localhost" TCP_SERVER_PORT="8081" cargo run --quiet --package chatty-tcp --bin client -- --username "david"
run-chatty-tcp-client-lucio-join:
TCP_SERVER_ADDRESS="localhost" TCP_SERVER_PORT="8081" cargo run --quiet --package chatty-tcp --bin client -- --username "lucio"
# .cargo/cargo.toml has SEND_CAL_EVENTS = "true" so we can overrride it here as needed
# watch running
watch-chatty-tcp-server:
cargo watch --why --poll -x "run --package chatty-tcp --bin server"
watch-run-chatty-tcp-client-carl-join:
cargo watch -x "run --package chatty-tcp --bin client -- --username \"carl\""
watch-run-chatty-tcp-client-david-join:
cargo watch -x "run --package chatty-tcp --bin client -- --username \"david\""
watch-run-chatty-tcp-client-lucio-join:
cargo watch -x "run --package chatty-tcp --bin client -- --username \"lucio\""
# tests
test:
cargo test --workspace --tests -- --show-output
test-chatty-tcp:
cargo test --package chatty-tcp --tests -- --show-output
# watch test
watch-test:
cargo watch -x "test --workspace"