@@ -53,7 +53,7 @@ xflags::xflags! {
53
53
54
54
/// Batch typecheck project and print summary statistics
55
55
cmd analysis-stats {
56
- /// Directory with Cargo.toml.
56
+ /// Directory with Cargo.toml or rust-project.json .
57
57
required path: PathBuf
58
58
59
59
optional --output format: OutputFormat
@@ -74,7 +74,7 @@ xflags::xflags! {
74
74
75
75
/// Don't run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.
76
76
optional --disable-build-scripts
77
- /// Don't use expand proc macros.
77
+ /// Don't expand proc macros.
78
78
optional --disable-proc-macros
79
79
/// Run the proc-macro-srv binary at the specified path.
80
80
optional --proc-macro-srv path: PathBuf
@@ -101,7 +101,7 @@ xflags::xflags! {
101
101
102
102
/// Run unit tests of the project using mir interpreter
103
103
cmd run-tests {
104
- /// Directory with Cargo.toml.
104
+ /// Directory with Cargo.toml or rust-project.json .
105
105
required path: PathBuf
106
106
}
107
107
@@ -115,30 +115,45 @@ xflags::xflags! {
115
115
}
116
116
117
117
cmd diagnostics {
118
- /// Directory with Cargo.toml.
118
+ /// Directory with Cargo.toml or rust-project.json .
119
119
required path: PathBuf
120
120
121
121
/// Don't run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.
122
122
optional --disable-build-scripts
123
- /// Don't use expand proc macros.
123
+ /// Don't expand proc macros.
124
124
optional --disable-proc-macros
125
125
/// Run the proc-macro-srv binary at the specified path.
126
126
optional --proc-macro-srv path: PathBuf
127
127
}
128
128
129
129
/// Report unresolved references
130
130
cmd unresolved-references {
131
- /// Directory with Cargo.toml.
131
+ /// Directory with Cargo.toml or rust-project.json .
132
132
required path: PathBuf
133
133
134
134
/// Don't run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.
135
135
optional --disable-build-scripts
136
- /// Don't use expand proc macros.
136
+ /// Don't expand proc macros.
137
137
optional --disable-proc-macros
138
138
/// Run the proc-macro-srv binary at the specified path.
139
139
optional --proc-macro-srv path: PathBuf
140
140
}
141
141
142
+ /// Prime caches, as rust-analyzer does typically at startup in interactive sessions.
143
+ cmd prime-caches {
144
+ /// Directory with Cargo.toml or rust-project.json.
145
+ required path: PathBuf
146
+
147
+ /// Don't run build scripts or load `OUT_DIR` values by running `cargo check` before analysis.
148
+ optional --disable-build-scripts
149
+ /// Don't expand proc macros.
150
+ optional --disable-proc-macros
151
+ /// Run the proc-macro-srv binary at the specified path.
152
+ optional --proc-macro-srv path: PathBuf
153
+ /// Run cache priming in parallel.
154
+ optional --parallel
155
+ }
156
+
142
157
cmd ssr {
143
158
/// A structured search replace rule (`$a.foo($b) ==>> bar($a, $b)`)
144
159
repeated rule: SsrRule
@@ -197,6 +212,7 @@ pub enum RustAnalyzerCmd {
197
212
RustcTests ( RustcTests ) ,
198
213
Diagnostics ( Diagnostics ) ,
199
214
UnresolvedReferences ( UnresolvedReferences ) ,
215
+ PrimeCaches ( PrimeCaches ) ,
200
216
Ssr ( Ssr ) ,
201
217
Search ( Search ) ,
202
218
Lsif ( Lsif ) ,
@@ -276,6 +292,16 @@ pub struct UnresolvedReferences {
276
292
pub proc_macro_srv : Option < PathBuf > ,
277
293
}
278
294
295
+ #[ derive( Debug ) ]
296
+ pub struct PrimeCaches {
297
+ pub path : PathBuf ,
298
+
299
+ pub disable_build_scripts : bool ,
300
+ pub disable_proc_macros : bool ,
301
+ pub proc_macro_srv : Option < PathBuf > ,
302
+ pub parallel : bool ,
303
+ }
304
+
279
305
#[ derive( Debug ) ]
280
306
pub struct Ssr {
281
307
pub rule : Vec < SsrRule > ,
0 commit comments