|
| 1 | +# Survey questions |
| 2 | + |
| 3 | +The goal of this survey is to figure out how much do Rust users struggle with compilation times and which development workflows are the most relevant for them. We would like to use this data so that we can focus the efforts of Rust compiler contributors on the areas of compilation performance that matter the most to our users. |
| 4 | + |
| 5 | +Your feedback is much appreciated! |
| 6 | + |
| 7 | +This survey is fully anonymous. The Rust survey team will go through the answers and release a summary on the Rust blog after the survey is complete. |
| 8 | + |
| 9 | +### Do you use Rust? |
| 10 | + |
| 11 | +Type: select one |
| 12 | + |
| 13 | +- Yes, I use Rust [`NEXT`](#do-you-code-in-rust-at-a-company) |
| 14 | +- No, I don't currently use Rust, but I have in the past [`NEXT`](#were-long-compilation-times-the-primary-reason-why-you-stopped-using-rust) |
| 15 | +- No, I have never used Rust [`NEXT`](#is-there-anything-else-related-to-rust-compiler-performance-that-you-would-like-to-tell-us) |
| 16 | + |
| 17 | +### Were long compilation times the primary reason why you stopped using Rust? |
| 18 | + |
| 19 | +Type: select one |
| 20 | + |
| 21 | +- Yes |
| 22 | +- No, but it was one of the reasons why I stopped using Rust |
| 23 | +- No [`NEXT`](#is-there-anything-else-related-to-rust-compiler-performance-that-you-would-like-to-tell-us) |
| 24 | + |
| 25 | +Please answer the following questions based on how did you use Rust before you stopped using it. |
| 26 | + |
| 27 | +## User classification |
| 28 | + |
| 29 | +### Which operating systems do you use regularly for Rust development? |
| 30 | + |
| 31 | +**Note**: this is specifically about which systems you personally use for development, *not* all the |
| 32 | +systems you target. |
| 33 | + |
| 34 | +Type: select all that apply (optional) |
| 35 | + |
| 36 | +- Linux |
| 37 | +- Windows |
| 38 | +- Windows Subsystem for Linux |
| 39 | +- macOS |
| 40 | +- Other (open response) |
| 41 | + |
| 42 | +### Do you code in Rust at a company? |
| 43 | + |
| 44 | +If yes, what is the approximate size of the company? |
| 45 | + |
| 46 | +Type: select one (optional) |
| 47 | + |
| 48 | +- No, I don't code in Rust in a company |
| 49 | +- Yes (1-50 employees) |
| 50 | +- Yes (51-500 employees) |
| 51 | +- Yes (501-5000 employees) |
| 52 | +- Yes (more than 5000 employees) |
| 53 | + |
| 54 | +## Development workflows |
| 55 | + |
| 56 | +Here we would like to understand what kinds of workflows you use when compiling Rust code. If you work on multiple projects with diverse workflows, please primarily focus on use-case(s) where you most struggle with compilation performance. |
| 57 | + |
| 58 | +### Which build systems do you use to build Rust code? |
| 59 | + |
| 60 | +Type: select all that apply (optional) |
| 61 | + |
| 62 | +- I use Cargo |
| 63 | +- I use some other build system |
| 64 | +- I combine Cargo and another build system |
| 65 | +- If you use other build system(s), which ones do you use? (open response) |
| 66 | + |
| 67 | +### How do you build your Rust projects? |
| 68 | + |
| 69 | +Type: select all that apply (optional) |
| 70 | + |
| 71 | +- On my local computer |
| 72 | +- On CI (Continuous Integration) infrastructure |
| 73 | +- On a remote or cloud server |
| 74 | +- Other (open response) |
| 75 | + |
| 76 | +### Which development workflows limit your productivity? |
| 77 | + |
| 78 | +Please rate how much do you struggle with compiler performance in the following development workflows. |
| 79 | + |
| 80 | +Type: matrix (optional) |
| 81 | + |
| 82 | +Workflows: |
| 83 | + |
| 84 | +- Type checking (change code, type check using *cargo check* or IDE) |
| 85 | +- Running tests (change code, run tests *cargo test* or IDE) |
| 86 | +- Unoptimized rebuilds (change code, rebuild without optimizations) |
| 87 | +- Optimized rebuilds (change code, rebuild with optimizations) |
| 88 | +- Workspace rebuilds (change a crate which causes multiple other crates in your workspace to be rebuilt) |
| 89 | +- Clean unoptimized builds (build a crate graph from scratch) |
| 90 | +- Clean optimized builds (build a crate graph from scratch) |
| 91 | +- CI (Continuous Integration) builds |
| 92 | +- Docker builds |
| 93 | + |
| 94 | +Options: |
| 95 | + |
| 96 | +- Big problem for me |
| 97 | +- Could be improved, but does not limit me |
| 98 | +- Not an issue for me at all |
| 99 | +- I don't use this workflow |
| 100 | + |
| 101 | +### Do you have any other Rust development workflows that you would like to mention? |
| 102 | + |
| 103 | +Type: free form (optional) |
| 104 | + |
| 105 | +### Do you use any caching to speed up CI builds? |
| 106 | + |
| 107 | +Type: select all that apply (optional) |
| 108 | + |
| 109 | +- rust-cache or other similar action |
| 110 | +- sccache |
| 111 | +- cargo-chef |
| 112 | +- Other (open response) |
| 113 | + |
| 114 | +### How large is the Rust project that you work on in terms of lines of Rust code? |
| 115 | + |
| 116 | +Please provide an answer for the Rust project where you most struggle with compilation times. Only include the lines of Rust code of your project, not of its dependencies. You can count the lines of code e.g. using [tokei](https://github.com/XAMPPRocky/tokei). |
| 117 | + |
| 118 | +Type: select one (optional) |
| 119 | + |
| 120 | +- Less than 2 thousand lines |
| 121 | +- 2-10 thousand lines |
| 122 | +- 11-50 thousand lines |
| 123 | +- 51-100 thousand lines |
| 124 | +- 101-500 thousand lines |
| 125 | +- More than 500 thousand lines of code |
| 126 | + |
| 127 | +### How large is the Rust project that you work on in terms of (Cargo) dependencies? |
| 128 | + |
| 129 | +Please provide an answer for the Rust project where you most struggle with compilation times. Include the number of external/third-party dependencies/crates (including transitive ones) compiled when you run e.g. *cargo build*. |
| 130 | + |
| 131 | +Type: select one (optional) |
| 132 | + |
| 133 | +- No dependencies |
| 134 | +- 1-10 dependencies |
| 135 | +- 11-50 dependencies |
| 136 | +- 51-100 dependencies |
| 137 | +- 101-200 dependencies |
| 138 | +- 201-300 dependencies |
| 139 | +- 301-500 dependencies |
| 140 | +- More than 500 dependencies |
| 141 | + |
| 142 | +### How long do you need to wait for the compiler to rebuild your code after making a change? |
| 143 | + |
| 144 | +Please select the longest duration range amongst the projects that you regularly work on. |
| 145 | + |
| 146 | +This question focuses on local development workflows, not CI or remote builds. If you do not compile your Rust code locally, please skip this question. |
| 147 | + |
| 148 | +Type: select one (optional) |
| 149 | + |
| 150 | +- Less than a second |
| 151 | +- Between 1 and 5 seconds |
| 152 | +- Between 5 and 10 seconds |
| 153 | +- Between 10 and 30 seconds |
| 154 | +- Between 30 seconds and 1 minute |
| 155 | +- Between 1 and 5 minutes |
| 156 | +- More than 5 minutes |
| 157 | + |
| 158 | +### Which of the following problems do you most struggle with? |
| 159 | + |
| 160 | +Type: matrix (optional) |
| 161 | + |
| 162 | +Commands: |
| 163 | + |
| 164 | +- Waiting for a rebuild after making a small change |
| 165 | +- Waiting for CI workflows that build Rust code |
| 166 | +- Waiting for an IDE to show me inline error/warning annotations |
| 167 | +- *cargo* and my IDE blocking each other |
| 168 | +- *cargo check* and *cargo build* not sharing compilation cache |
| 169 | +- *cargo check* and *cargo clippy* not sharing compilation cache |
| 170 | +- *cargo* rebuilding everything from scratch and I do not understand why |
| 171 | + |
| 172 | +Options: |
| 173 | + |
| 174 | +- Big problem for me |
| 175 | +- Could be improved, but does not limit me |
| 176 | +- Not an issue for me at all |
| 177 | + |
| 178 | +### How do you primarily examine compilation errors in your code? |
| 179 | + |
| 180 | +Type: select all that apply (optional) |
| 181 | + |
| 182 | +- Using code editor (e.g. inline annotations) |
| 183 | +- Using terminal commands (e.g. *cargo check*) |
| 184 | +- Other (open response) |
| 185 | + |
| 186 | +### If you use Cargo, how often do you use the following commands after each change to Rust code? |
| 187 | + |
| 188 | +Type: matrix (optional) |
| 189 | + |
| 190 | +Commands: |
| 191 | + |
| 192 | +- cargo check |
| 193 | +- cargo clippy |
| 194 | +- cargo test |
| 195 | +- cargo run / cargo build |
| 196 | + |
| 197 | +Frequency: |
| 198 | + |
| 199 | +- After every code change |
| 200 | +- Only after I have resolved other issues |
| 201 | +- Only after I am done (e.g. before committing code) |
| 202 | +- Never |
| 203 | + |
| 204 | +### Are you aware of the following tools for profiling Rust compilation? |
| 205 | + |
| 206 | +Type: matrix (optional) |
| 207 | + |
| 208 | +Tools: |
| 209 | + |
| 210 | +- Compiler self profiler (*-Zself-profile*) |
| 211 | +- Compiler pass analysis (*-Ztime-passes*) |
| 212 | +- LLVM function instantiation analysis (*cargo-llvm-lines*) |
| 213 | +- Cargo timings (*cargo build --timings*) |
| 214 | + |
| 215 | +Familiarity: |
| 216 | + |
| 217 | +- I use it |
| 218 | +- I know of it, but don't use it |
| 219 | +- Never heard of it |
| 220 | + |
| 221 | +## Workarounds |
| 222 | + |
| 223 | +Here we would like to find out what workarounds you use to improve compilation performance. |
| 224 | + |
| 225 | +### Have you used any of the following mechanisms to improve compilation performance? |
| 226 | + |
| 227 | +Note that answers are optional, if you do not fill an answer for a specific row, we will assume it to mean that you haven't used that mechanism. |
| 228 | + |
| 229 | +Type: matrix (optional) |
| 230 | + |
| 231 | +Mechanisms: |
| 232 | + |
| 233 | +- Disable (or reduce) debuginfo (e.g. set *debug = 0* in Cargo.toml) |
| 234 | +- Parallel compiler frontend (pass *-Zthreads=<N>* to the compiler) |
| 235 | +- Cranelift codegen backend (e.g. set *codegen-backend = "cranelift"* in Cargo.toml) |
| 236 | +- Alternative linker (e.g. lld/mold/wild) |
| 237 | +- Caching compiler wrapper (e.g. sccache) |
| 238 | +- Share *target* directory amongst multiple projects (e.g. with CARGO_TARGET_DIR) |
| 239 | +- Split crates into smaller crates |
| 240 | +- Reduce the amount of dependencies |
| 241 | +- Disable default Cargo features of dependencies |
| 242 | +- Create a Cargo feature to make certain dependencies (or their features) opt-in |
| 243 | +- Reduce usage of procedural macros |
| 244 | +- Reduce usage of generic code (e.g. by converting it to *dyn Trait* instead) |
| 245 | +- Merge integration tests into a single binary |
| 246 | + |
| 247 | +Results: |
| 248 | + |
| 249 | +- It helps me improve compile times |
| 250 | +- I tried it, but it didn't help |
| 251 | +- I know of it, but haven't tried it |
| 252 | +- Never heard of it |
| 253 | + |
| 254 | +### If you use an alternative linker, which one do you use? |
| 255 | + |
| 256 | +Type: select all that apply (optional) |
| 257 | + |
| 258 | +- gold |
| 259 | +- lld |
| 260 | +- mold |
| 261 | +- wild |
| 262 | +- Other (open response) |
| 263 | + |
| 264 | +### Do you use a nightly compiler to achieve better compilation performance? |
| 265 | + |
| 266 | +Please answer *Yes* only if you use the *nightly* toolchain primarily for achieving better compilation performance, not for other reasons. |
| 267 | + |
| 268 | +Type: select one (optional) |
| 269 | + |
| 270 | +- Yes |
| 271 | +- No [`NEXT`](#debugging-and-profiling) |
| 272 | + |
| 273 | +### How does using the nightly compiler help you achieve better compilation performance? |
| 274 | + |
| 275 | +Type: free form (optional) |
| 276 | + |
| 277 | +### Is there some other mechanism for improving compilation performance that you use? |
| 278 | + |
| 279 | +Type: free form (optional) |
| 280 | + |
| 281 | +## Debugging and profiling |
| 282 | + |
| 283 | +Here we would like to find out if you use debuginfo in Rust programs. |
| 284 | + |
| 285 | +### How often do you use a debugger to debug your Rust code? |
| 286 | + |
| 287 | +Type: select one (optional) |
| 288 | + |
| 289 | +- Never or very rarely |
| 290 | +- Sometimes (e.g. once per week or less) |
| 291 | +- Often (e.g. multiple times per day) |
| 292 | +- Almost always (e.g. after almost every build) |
| 293 | + |
| 294 | +### How often do you use a profiler to profile your Rust code? |
| 295 | + |
| 296 | +Type: select one (optional) |
| 297 | + |
| 298 | +- Never or very rarely |
| 299 | +- Sometimes (e.g. once per week or less) |
| 300 | +- Often (e.g. multiple times per day) |
| 301 | +- Almost always (e.g. after almost every build) |
| 302 | + |
| 303 | +### Do you require unoptimized builds to have debuginfo by default? |
| 304 | + |
| 305 | +*cargo build* with the default *dev* profile produces full debug information (debuginfo) by default, including full debuginfo for all your dependencies. This enables debugging using a debugger, but it can also make compilation times slower (by varying amounts, e.g. 5-30%). In order to improve compilation performance, this debuginfo could be lowered e.g. to *line-tables-only* by default, which still enables rich backtrace information, but does not allow proper debugging. |
| 306 | + |
| 307 | +Type: select one (optional) |
| 308 | + |
| 309 | +- Yes, I want full debuginfo by default |
| 310 | +- Yes, but I do not need full debuginfo for my dependencies, just for my code |
| 311 | +- No, I would prefer slightly faster compilation with less debuginfo by default |
| 312 | + |
| 313 | +## Hardware |
| 314 | + |
| 315 | +Here we would like to get basic hardware information about the computer/server that you most often use to compile your Rust code. If you compile your code using a remote server, please enter the specs of that server. |
| 316 | + |
| 317 | +### How many cores does your computer have? |
| 318 | + |
| 319 | +Please enter the number of "hardware threads" (including hyperthreads). If you do not know what are hyperthreads, just enter a number of cores that you think your computer has. |
| 320 | + |
| 321 | +Type: select one (optional) |
| 322 | + |
| 323 | +- 1 |
| 324 | +- 2-4 |
| 325 | +- 5-8 |
| 326 | +- 9-16 |
| 327 | +- 17-32 |
| 328 | +- More than 32 cores |
| 329 | + |
| 330 | +### How much RAM memory does your computer have? |
| 331 | + |
| 332 | +Type: select one (optional) |
| 333 | + |
| 334 | +- Less than 2 GiB |
| 335 | +- 2-4 GiB |
| 336 | +- 5-8 GiB |
| 337 | +- 9-16 GiB |
| 338 | +- 17-32 GiB |
| 339 | +- 33-64 GiB |
| 340 | +- More than 64 GiB |
| 341 | + |
| 342 | +### Overall, how satisfied are you with Rust compilation performance? |
| 343 | + |
| 344 | +Type: rating scale (optional) |
| 345 | + |
| 346 | +### Is there anything else related to Rust compiler performance that you would like to tell us? |
| 347 | + |
| 348 | +Type: free form (optional) |
0 commit comments