Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put clarifying language in migration guide regarding the serde:: and non-serde:: paths #715

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/migration_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ Because of confusion with `Options` defaults in bincode 1, we have made `Configu

## Migrating with `serde`

Make sure to include bincode 2 with the `serde` feature enabled.
You may wish to stick with `serde` when migrating to bincode 2, for example if you are using serde-exclusive derive features such as `#[serde(deserialize_with)]`.

If so, make sure to include bincode 2 with the `serde` feature enabled.
mcclure marked this conversation as resolved.
Show resolved Hide resolved

```toml
[dependencies]
Expand All @@ -62,7 +64,7 @@ Then replace the following functions: (`Configuration` is `bincode::config::lega
| `bincode::serialize_into(std::io::Write, T)` | `bincode::serde::encode_into_std_write(T, std::io::Write, Configuration)` |
| `bincode::serialized_size(T)` | Currently not implemented |

## Migrating to `bincode-derive`
## Migrating from `serde` to `bincode-derive`

`bincode-derive` is enabled by default. If you're using `default-features = false`, make sure to add `features = ["derive"]` to your `Cargo.toml`.

Expand Down
Loading