Commit a419e00
authored
bcs: clean deps, reduce CI clean build time (#14)
* deps: use serde_core directly
`bcs` only uses proc-macro serde derives in tests. We can reduce compile
times by using `serde_core` directly, which only exports the core serde
traits.
* deps: remove thiserror, impl Error manually
Before:
```
$ cargo tree --edges build,normal
bcs v0.1.6 (/home/phlip9/dev/bcs)
├── serde v1.0.228
│ ├── serde_core v1.0.228
│ └── serde_derive v1.0.228 (proc-macro)
│ ├── proc-macro2 v1.0.106
│ │ └── unicode-ident v1.0.24
│ ├── quote v1.0.45
│ │ └── proc-macro2 v1.0.106 (*)
│ └── syn v2.0.117
│ ├── proc-macro2 v1.0.106 (*)
│ ├── quote v1.0.45 (*)
│ └── unicode-ident v1.0.24
└── thiserror v1.0.69
└── thiserror-impl v1.0.69 (proc-macro)
├── proc-macro2 v1.0.106 (*)
├── quote v1.0.45 (*)
└── syn v2.0.117 (*)
$ rm -rf /tmp/cargo-target && taskset -c 3 cargo build --target-dir /tmp/cargo-target --lib
Finished dev [unoptimized + debuginfo] target(s) in 7.89s
```
After:
```
$ cargo tree --edges build,normal
Updating crates.io index
bcs v0.1.6 (/home/phlip9/dev/bcs)
└── serde_core v1.0.228
$ rm -rf /tmp/cargo-target && taskset -c 3 cargo build --target-dir /tmp/cargo-target --lib
Compiling serde_core v1.0.228
Compiling bcs v0.1.6 (/home/phlip9/dev/bcs)
Finished dev [unoptimized + debuginfo] target(s) in 1.38s
```
* msrv: 1.56 -> 1.61, fix CI
In theory we should be able to support an MSRV of `1.56`. Unfortunately this
entry in `serde_core`'s Cargo.toml seems to confuse Cargo into adding
`serde_derive` into the lock file, which only has a compatible MSRV of `1.61`.
```toml
[target.'cfg(any())'.dependencies]
serde_derive = { version = "=1.0.220", path = "../serde_derive" }
```1 parent 1d03bda commit a419e00
8 files changed
Lines changed: 1077 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 16 | + | |
| 17 | + | |
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
| |||
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
0 commit comments