Commit 4c99cf3
authored
Turbopack: bincode: Add crate with bincode serialization helpers (#85878)
Add helpers for using bincode with various commonly-used foreign types that do not implement `bincode::Encode`/`bincode::Decode`. We can't implement the bincode traits on these types ourselves because of the orphan rules.
This is pulled out of #85878 to make it easier to review.
This depends on my fork of bincode here: https://github.com/bgw/bincode/commits/bgw/patches/
Specifically, the `with =` attribute I added here: bgw/bincode@4103717
This behaves like the serde equivalent: https://serde.rs/field-attrs.html#with
I am working on trying to get the changes with the bincode fork upstreamed. I submitted a bugfix (bgw/bincode@9247286) via email to the maintainer to start. Upstream is hosted at https://git.sr.ht/~stygianentity/bincode and my fork there is at https://git.sr.ht/~bgw/bincode .1 parent be0d24a commit 4c99cf3
File tree
4 files changed
+643
-7
lines changed- turbopack/crates/turbo-bincode
- src
4 files changed
+643
-7
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| |||
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| 363 | + | |
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
| |||
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
| 486 | + | |
484 | 487 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments