-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
163 lines (123 loc) · 4.96 KB
/
justfile
File metadata and controls
163 lines (123 loc) · 4.96 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
default:
just --list
install-cli:
cargo install --path crates/rustmax-cli
clean: doc-clean
cargo clean
check:
cargo check -p rustmax
cargo check -p rustmax --features rmx-profile-no-std
cargo check -p rustmax --features rmx-profile-std
cargo check -p rustmax --features rmx-profile-full
cargo check -p rustmax --features rmx-profile-max
cargo check -p rustmax-cli
cargo check -p rustmax --features=rmx-profile-portable --target=wasm32-unknown-unknown
test:
cargo test -p rustmax --lib --tests --bins
cargo test -p rustmax --features rmx-profile-std --lib --tests --bins
cargo test -p rustmax --features rmx-profile-full --lib --tests --bins
cargo test -p rustmax --features rmx-profile-max --lib --tests --bins
cargo check -p rustmax --features=rmx-profile-portable --target=wasm32-unknown-unknown
cargo run -p rustmax-cli -- doctest
test-rustdoc:
cargo test -p rustmax --features rmx-profile-max --doc
test-musl:
cargo check -p rustmax --target x86_64-unknown-linux-musl --features rmx-profile-portable
test-wasm:
cargo check -p rustmax --target wasm32-unknown-unknown --features rmx-profile-portable
test-min-version-build: maint-lock-minimum-versions
cargo test -p rustmax --features rmx-profile-std
test-ci-linux: test test-musl
test-ci-win: test
lint:
cargo deny check
cargo audit
cargo clippy
#cargo fmt --check
build: doc-build
maint-outdated:
cargo outdated
maint-duplicates:
cargo duplicates
maint-upgrade:
cargo upgrade --incompatible --compatible=ignore
# useful prior to running `cargo audit`
maint-lock-minimum-versions:
cargo +nightly update -Z minimal-versions
maint-audit:
cargo audit
prebuild:
cargo run -p rustmax-prebuild
doc-clean:
rm -rf out
doc-api: prebuild
# Generate JSON for rustmax and all dependencies.
RUSTDOCFLAGS="-Z unstable-options --output-format json" cargo +nightly doc -p rustmax --features rmx-profile-max
# Copy std library JSON files from nightly toolchain (requires rust-docs-json component).
cp "$(rustup +nightly which rustc | sed 's|/bin/rustc|/share/doc/rust/json|')"/*.json target/doc/ 2>/dev/null || echo "Warning: rust-docs-json not installed, std links won't resolve"
# Build HTML docs with rustmax-rustdoc.
rm -rf out/api
mkdir -p out/api
cargo run -p rustmax-cli --release -- rustdoc build target/doc/ -o out/api
doc-book:
rm -rf book/book
cargo run --release -- rmxbook book book/book
doc-library: prebuild
@if [ -n "${RUSTMAX_CI:-}" ]; then \
cargo run -- refresh-library; \
fi
cargo run --release -- build-library --generate-library-page
export-search-index:
cargo run -p rustmax-cli -- export-search-index
search query: export-search-index
cargo run -p rustmax-cli -- search {{query}}
doc-www: doc-library export-search-index
mkdir -p out/
cp -r www/* out/
cp work/crates.html out/
cp work/build-info.json out/
cp work/latest-post.html out/ || true
cp work/news.html out/ || true
cp work/news.xml out/ || true
cp work/search-index.json out/
doc-build: doc-www doc-api doc-book doc-library
mkdir -p out/book
cp -r book/book/* out/book/
mkdir -p out/library
cp -r work/library/* out/library/
publish-dry:
cargo publish -p rustmax --dry-run
cargo publish -p rustmax-doctest --dry-run
cargo publish -p rustmax-rustdoc --dry-run
cargo publish -p rustmax-cli --dry-run
publish:
cargo publish -p rustmax
cargo publish -p rustmax-doctest
cargo publish -p rustmax-rustdoc
cargo publish -p rustmax-cli --allow-dirty
replace-version old new:
sd "^version = \"{{old}}\"" "version = \"{{new}}\"" Cargo.toml
fd --type file --exec sd "^rmx\.version = \"{{old}}\"" "rmx.version = \"{{new}}\""
cargo check # update lockfile
anthology-build: anthology-index
anthology-list:
cargo run -p rustmax-anthology -- --metadata-dir crates/rustmax-anthology/metadata \
--fetched-dir crates/rustmax-anthology/fetched list
anthology-status:
cargo run -p rustmax-anthology -- --metadata-dir crates/rustmax-anthology/metadata \
--fetched-dir crates/rustmax-anthology/fetched status
anthology-process id:
cargo run -p rustmax-anthology -- --metadata-dir crates/rustmax-anthology/metadata \
--fetched-dir crates/rustmax-anthology/fetched process {{id}}
just anthology-index
anthology-process-all:
cargo run -p rustmax-anthology -- --metadata-dir crates/rustmax-anthology/metadata \
--fetched-dir crates/rustmax-anthology/fetched process all
just anthology-index
anthology-build-book: anthology-index
cargo run -p rustmax-anthology -- --metadata-dir crates/rustmax-anthology/metadata \
--fetched-dir crates/rustmax-anthology/fetched \
--book-dir crates/rustmax-anthology/book build
anthology-index:
cargo run -p rustmax-anthology -- --metadata-dir crates/rustmax-anthology/metadata \
--fetched-dir crates/rustmax-anthology/fetched generate-index