Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
174 lines (130 loc) · 5.43 KB
/
Copy pathjustfile
File metadata and controls
174 lines (130 loc) · 5.43 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
164
165
166
167
168
169
170
171
172
173
174
# The nightly used for rustdoc JSON, which is unstable.
# Bump deliberately, together with the rustdoc-types version in rustmax-rustdoc.
nightly := "nightly-2026-10-09"
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-max
cargo check -p rustmax-cli
cargo check -p rustmax-macros-test
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-max --lib --tests --bins
cargo test -p rustmax-macros-test
cargo test -p rustmax-cli
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
# The demoapp is its own workspace, so `just test` does not reach it.
test-demoapp:
cd demoapp && cargo test
test-ci-linux: test test-musl test-demoapp
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
cd demoapp && cargo audit
doc-clean:
rm -rf out
install-nightly:
rustup toolchain install {{nightly}} --profile minimal --component rust-docs-json
doc-api: install-nightly
# 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 the rust-docs-json component.
cp "$(rustup +{{nightly}} which rustc | sed 's|/bin/rustc|/share/doc/rust/json|')"/*.json target/doc/
# 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:
@if [ -n "${RUSTMAX_CI:-}" ]; then \
cargo run --release -- refresh-library; \
fi
cargo run --release -- build-library --generate-library-page
export-search-index:
cargo run -p rustmax-cli --release -- export-search-index
search query: export-search-index
cargo run -p rustmax-cli -- search {{query}}
# Recompute the search parity corpus from www/search-core.js.
# Only after a deliberate algorithm change; see the script's comments.
gen-search-corpus:
node crates/rustmax-cli/tests/gen-search-corpus.js
doc-www: doc-library export-search-index
cargo run -p rustmax-cli --release -- build-www out
cp work/search-index.json out/
# Requires a built site; run after doc-api.
doc-check-links:
cargo run -p rustmax-cli --release -- validate-links
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/
just doc-check-links
publish_packages := "-p rustmax-macros -p rustmax -p rustmax-doctest -p rustmax-rustdoc -p rustmax-cli"
# Cargo publishes these in dependency order, and the dry run verifies
# each package against the others before any of them is on crates.io.
publish-dry:
cargo publish {{publish_packages}} --dry-run
publish:
cargo publish {{publish_packages}}
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