-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
56 lines (45 loc) · 1.55 KB
/
Copy pathJustfile
File metadata and controls
56 lines (45 loc) · 1.55 KB
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
# Lists all available commands.
list:
@just --list
# Builds the library in release mode.
build:
cargo build --release
# Detects problems using rustfmt, clippy, and cargo check.
check:
cargo +nightly fmt --all -- --check --unstable-features
cargo +nightly clippy --all-targets --all-features -- -D warnings
cargo +nightly check --locked
# Fixes linting problems automatically using clippy, cargo fix, and rustfmt.
fix:
cargo +nightly clippy --all-targets --all-features --fix --allow-dirty --allow-staged
cargo +nightly fix --allow-dirty --allow-staged
cargo +nightly fmt --all -- --unstable-features
# Runs all tests.
test:
cargo test --locked --all-targets
# Runs the benchmark suite.
bench:
cargo bench
# Cleans all build artifacts.
clean:
cargo clean
# Builds the book and serves it locally with live reload on port 4321.
book:
@just _book-install-mermaid
cd book && mdbook serve --open --port 4321
# Builds the book once into book/book/ without serving.
book-build:
@just _book-install-mermaid
cd book && mdbook build
# Removes the rendered book.
book-clean:
cd book && mdbook clean
# One-time install of mdbook + mdbook-mermaid via cargo, plus the
# mermaid theme assets the book.toml references.
_book-install-mermaid:
@command -v mdbook >/dev/null || cargo install mdbook
@command -v mdbook-mermaid >/dev/null || cargo install mdbook-mermaid
@test -f book/mermaid.min.js || (cd book && mdbook-mermaid install .)
# Publishes the crate to crates.io.
publish:
cargo publish