|
| 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 compilation 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. 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. |
| 6 | + |
| 7 | +## User classification |
| 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 [`END`](#other) |
| 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 |
| 24 | + |
| 25 | +### Which operating systems do you use regularly for Rust development? |
| 26 | + |
| 27 | +**Note**: this is specifically about which systems you personally use for development, *not* all the |
| 28 | +systems you target. |
| 29 | + |
| 30 | +Type: select all that apply (optional) |
| 31 | + |
| 32 | +- Linux |
| 33 | +- Windows |
| 34 | +- Windows Subsystem for Linux |
| 35 | +- macOS |
| 36 | +- Other (open response) |
| 37 | + |
| 38 | +### Do you code in Rust at a company? |
| 39 | + |
| 40 | +If yes, what is the approximate size of the company? |
| 41 | + |
| 42 | +Type: select one (optional) |
| 43 | + |
| 44 | +- No, I do not code in Rust in a company |
| 45 | +- Yes (1-50 employees) |
| 46 | +- Yes (51-500 employees) |
| 47 | +- Yes (501-5000 employees) |
| 48 | +- Yes (more than 5000 employees) |
| 49 | + |
| 50 | +## Workflows |
| 51 | + |
| 52 | +### How do you build your Rust projects? |
| 53 | + |
| 54 | +Type: select all that apply (optional) |
| 55 | + |
| 56 | +- I use Cargo |
| 57 | +- I use some other build system |
| 58 | +- I combine Cargo and another build system |
| 59 | +- If you use Cargo with (or just use) other build systems, which ones do you use? (open response) |
| 60 | + |
| 61 | +### Which compilation workflows are the most important to you? |
| 62 | + |
| 63 | +Please rate how important are the following compilation workflows to you, and how much do you currently struggle with their performance currently. |
| 64 | + |
| 65 | +Type: matrix (optional) |
| 66 | + |
| 67 | +Workflows: |
| 68 | + |
| 69 | +- Unoptimized rebuild (change code, rebuild without optimizations) |
| 70 | +- Optimized rebuild (change code, rebuild with optimizations) |
| 71 | +- Workspace rebuild (change a crate which causes multiple other crates in your workspace to be rebuilt) |
| 72 | +- Clean unoptimized build (build a crate graph from scratch) |
| 73 | +- Clean optimized build (build a crate graph from scratch) |
| 74 | +- Build in a CI workflow |
| 75 | + |
| 76 | +Priority: |
| 77 | + |
| 78 | +- Not important for me |
| 79 | +- Important for me, compile times are okay for me |
| 80 | +- Important for me, compile times are a blocker for me |
| 81 | + |
| 82 | +### How do you primarily examine compilation errors in your code? |
| 83 | + |
| 84 | +Type: select all that apply (optional) |
| 85 | + |
| 86 | +- Using code editor (e.g. inline annotations) |
| 87 | +- Using terminal commands (e.g. `cargo check`) |
| 88 | +- Other (open response) |
| 89 | + |
| 90 | +### If you use Cargo, how often do you use the following commands after making changes to Rust code? |
| 91 | + |
| 92 | +Type: matrix (optional) |
| 93 | + |
| 94 | +Commands: |
| 95 | + |
| 96 | +- `cargo check` |
| 97 | +- `cargo build` |
| 98 | +- `cargo test` |
| 99 | + |
| 100 | +Frequency: |
| 101 | + |
| 102 | +- Rarely |
| 103 | +- Sometimes |
| 104 | +- Often |
| 105 | + |
| 106 | +### How long do you need to wait for the compiler to rebuild your code after making a change? |
| 107 | + |
| 108 | +Please select the longest duration range amongst the projects that you regularly work on. |
| 109 | + |
| 110 | +Type: select one (optional) |
| 111 | + |
| 112 | +- Less than a second |
| 113 | +- Between 1 and 5 seconds |
| 114 | +- Between 5 and 10 seconds |
| 115 | +- Between 10 and 30 seconds |
| 116 | +- Between 30 seconds and 1 minute |
| 117 | +- Between 1 and 5 minutes |
| 118 | +- More than 5 minutes |
| 119 | + |
| 120 | +### Which of the following problems do you most struggle with? |
| 121 | + |
| 122 | +Type: matrix (optional) |
| 123 | + |
| 124 | +Commands: |
| 125 | + |
| 126 | +- Waiting for a rebuild after making a small change. |
| 127 | +- Waiting for CI workflows that build Rust code. |
| 128 | +- `cargo check` and `cargo build` not sharing compilation cache. |
| 129 | +- `cargo check` and `cargo clippy` not sharing compilation cache. |
| 130 | + |
| 131 | +Priority: |
| 132 | + |
| 133 | +- Not a problem for me |
| 134 | +- Could be improved |
| 135 | +- Big blocker for me |
| 136 | + |
| 137 | +## Workarounds |
| 138 | + |
| 139 | +### Do you use any of the following compiler options to improve compilation performance? |
| 140 | + |
| 141 | +Type: select all that apply (optional) |
| 142 | + |
| 143 | +- Disable (or reduce) debuginfo (e.g. set `debug = 0` in `Cargo.toml`) |
| 144 | +- Parallel compiler frontend (pass `-Zthreads=<N>` to the compiler) |
| 145 | +- Cranelift codegen backend (e.g. set `codegen-backend = "cranelift"` in `Cargo.toml`) |
| 146 | +- Alternative linker (e.g. `lld`/`mold`/`wild`) |
| 147 | +- Caching compiler wrapper (e.g. `sccache`) |
| 148 | +- Something else (open response) |
| 149 | + |
| 150 | +### If you use an alternative linker, which one do you use? |
| 151 | + |
| 152 | +Type: select all that apply (optional) |
| 153 | + |
| 154 | +- gold |
| 155 | +- lld |
| 156 | +- mold |
| 157 | +- wild |
| 158 | +- Other (open response) |
| 159 | + |
| 160 | +### Do you use any of the following compiler options to improve compilation performance? |
| 161 | + |
| 162 | +Type: select all that apply (optional) |
| 163 | + |
| 164 | +- Disable (or reduce) debuginfo (e.g. setting `debug = 0` in `Cargo.toml`) |
| 165 | +- Parallel compiler frontend (passing `-Zthreads=<N>` to the compiler) |
| 166 | +- Cranelift codegen backend (e.g. setting `codegen-backend = "cranelift"` in `Cargo.toml`) |
| 167 | +- Alternative linker (e.g. LLD/mold/wild) |
| 168 | + |
| 169 | +### Do you use a global `config.toml` override? |
| 170 | + |
| 171 | +You can create a `config.toml` file in your `CARGO_HOME` directory (e.g. `~/.cargo/config.toml`) which can be used to apply certain compilation settings (e.g. using a faster linker) across all Cargo projects on your computer. |
| 172 | + |
| 173 | +Type: select one (optional) |
| 174 | + |
| 175 | +- Yes |
| 176 | +- No |
| 177 | + |
| 178 | +### Do you use any of the following methods to improve compilation performance? |
| 179 | + |
| 180 | +Please select only methods that you have used primarily in order to improve compilation performance, not for other reasons. |
| 181 | + |
| 182 | +Type: select all that apply (optional) |
| 183 | + |
| 184 | +- Splitting crates into smaller crates |
| 185 | +- Reducing the amount of dependencies |
| 186 | +- Disabling default Cargo features of dependencies |
| 187 | +- Creating a Cargo feature that makes certain dependencies (or their features) optional |
| 188 | +- Something else (open response) |
| 189 | + |
| 190 | +### Do you use a nightly compiler to achieve better compilation performance? |
| 191 | + |
| 192 | +Please answer `Yes` if you use the `nightly` toolchain primarily for achieving better compilation performance, not for other reasons. |
| 193 | + |
| 194 | +Type: select one (optional) |
| 195 | + |
| 196 | +- Yes |
| 197 | +- No |
| 198 | + |
| 199 | +## Debugging |
| 200 | + |
| 201 | +### How often do you use a debugger to debug your Rust code? |
| 202 | + |
| 203 | +Type: select one (optional) |
| 204 | + |
| 205 | +- Never or very rarely |
| 206 | +- Sometimes (e.g. once per week or less) |
| 207 | +- Often (e.g. multiple times per day) |
| 208 | +- Almost always (e.g. after almost every build) |
| 209 | + |
| 210 | +### Do you require unoptimized builds to be debuggable by default? |
| 211 | + |
| 212 | +`cargo build` with the default `dev` profile produces full debug information (debuginfo) by default. This enables debugging using a debugger, but it can also make compilation times slower (by varying amounts, e.g. 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. |
| 213 | + |
| 214 | +Type: select one (optional) |
| 215 | + |
| 216 | +- Yes, I want full debuginfo by default |
| 217 | +- No, I would prefer faster compilation with less debuginfo by default |
| 218 | + |
| 219 | +## Other |
| 220 | + |
| 221 | +### Is there anything else related to Rust compiler performance that you would like to tell us? |
| 222 | + |
| 223 | +Type: free text (optional) |
0 commit comments