Commit af2c770
bors-servo
Auto merge of #235 - thomcc:optional-serde, r=jdm
Make serde dependency optional
This crate (and deps) takes around 8s to compile on my machine. I checked and this is mostly serde, and without it, a full rebuild takes only 0.5s (again, on my machine).
Many users of the crate will need serde, but some will not (e.g. I don't), and it's nice to get that compile time back for those that don't. It's on by default, for compatibility reasons, because default seems reasonable, and because I don't really care so long as I can disable it.
I've named the feature `serde_support` instead of just `serde` in case you ever need to enable other crates or dep feature based on this (but perhaps I'm wrong and this would be possible anyway).
I have tested locally, and added a CI smoke test to ensure it compiles without serde, but we don't run tests with out it (there are no serde-specific tests AFAICT, since the impls are indeed trivial, so the result would be the same anyway).3 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
0 commit comments