You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/migration_guide.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Bincode 2 now has an optional dependency on `serde`. You can either use `serde`,
4
4
5
5
## From `Options` to `Configuration`
6
6
7
-
Bincode 1 had the [Options](https://docs.rs/bincode/1/bincode/config/trait.Options.html) trait. This has been replaced with the [Configuration](https://docs.rs/bincode/2.0.0-beta/bincode/config/struct.Configuration.html) struct.
7
+
Bincode 1 had the [Options](https://docs.rs/bincode/1/bincode/config/trait.Options.html) trait. This has been replaced with the [Configuration](https://docs.rs/bincode/2.0.0-rc/bincode/config/struct.Configuration.html) struct.
8
8
9
9
If you're using `Options`, you can change it like this:
10
10
@@ -43,10 +43,10 @@ Make sure to include bincode 2 with the `serde` feature enabled.
43
43
44
44
```toml
45
45
[dependencies]
46
-
bincode = { version = "2.0.0-beta", features = ["serde"] }
46
+
bincode = { version = "2.0.0-rc", features = ["serde"] }
47
47
48
48
# Optionally you can disable the `derive` feature:
49
-
# bincode = { version = "2.0.0-beta", default-features = false, features = ["std", "serde"] }
49
+
# bincode = { version = "2.0.0-rc", default-features = false, features = ["std", "serde"] }
50
50
```
51
51
52
52
@@ -68,13 +68,13 @@ Then replace the following functions: (`Configuration` is `bincode::config::lega
68
68
69
69
```toml,ignore
70
70
[dependencies]
71
-
bincode = "2.0.0-beta"
71
+
bincode = "2.0.0-rc"
72
72
73
73
# If you need `no_std` with `alloc`:
74
-
# bincode = { version = "2.0.0-beta", default-features = false, features = ["derive", "alloc"] }
74
+
# bincode = { version = "2.0.0-rc", default-features = false, features = ["derive", "alloc"] }
75
75
76
76
# If you need `no_std` and no `alloc`:
77
-
# bincode = { version = "2.0.0-beta", default-features = false, features = ["derive"] }
77
+
# bincode = { version = "2.0.0-rc", default-features = false, features = ["derive"] }
78
78
```
79
79
80
80
Replace or add the following attributes. You are able to use both `serde-derive` and `bincode-derive` side-by-side.
@@ -84,7 +84,7 @@ Replace or add the following attributes. You are able to use both `serde-derive`
**note:** To implement these traits manually, see the documentation of [Encode](https://docs.rs/bincode/2.0.0-beta/bincode/enc/trait.Encode.html) and [Decode](https://docs.rs/bincode/2.0.0-beta/bincode/de/trait.Decode.html).
87
+
**note:** To implement these traits manually, see the documentation of [Encode](https://docs.rs/bincode/2.0.0-rc/bincode/enc/trait.Encode.html) and [Decode](https://docs.rs/bincode/2.0.0-rc/bincode/de/trait.Decode.html).
88
88
89
89
**note:** For more information on using `bincode-derive` with external libraries, see [below](#bincode-derive-and-libraries).
90
90
@@ -105,10 +105,10 @@ Then replace the following functions: (`Configuration` is `bincode::config::lega
105
105
106
106
Currently not many libraries support the traits `Encode` and `Decode`. There are a couple of options if you want to use `#[derive(bincode::Encode, bincode::Decode)]`:
107
107
- Enable the `serde` feature and add a `#[bincode(with_serde)]` above each field that implements `serde::Serialize/Deserialize` but not `Encode/Decode`
108
-
- Enable the `serde` feature and wrap your field in [bincode::serde::Compat](https://docs.rs/bincode/2.0.0-beta/bincode/serde/struct.Compat.html) or [bincode::serde::BorrowCompat](https://docs.rs/bincode/2.0.0-beta/bincode/serde/struct.BorrowCompat.html)
108
+
- Enable the `serde` feature and wrap your field in [bincode::serde::Compat](https://docs.rs/bincode/2.0.0-rc/bincode/serde/struct.Compat.html) or [bincode::serde::BorrowCompat](https://docs.rs/bincode/2.0.0-rc/bincode/serde/struct.BorrowCompat.html)
109
109
- Make a pull request to the library:
110
110
- Make sure to be respectful, most of the developers are doing this in their free time.
111
-
- Add a dependency `bincode = { version = "2.0.0-beta", default-features = false, optional = true }` to the `Cargo.toml`
Copy file name to clipboardExpand all lines: docs/spec.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -40,15 +40,15 @@ Encoding an unsigned integer v (of any type excepting u8/i8) works as follows:
40
40
41
41
`usize` is being encoded/decoded as a `u64` and `isize` is being encoded/decoded as a `i64`.
42
42
43
-
See the documentation of [VarintEncoding](https://docs.rs/bincode/2.0.0-beta/bincode/config/struct.Configuration.html#method.with_variable_int_encoding) for more information.
43
+
See the documentation of [VarintEncoding](https://docs.rs/bincode/2.0.0-rc/bincode/config/struct.Configuration.html#method.with_variable_int_encoding) for more information.
44
44
45
45
### FixintEncoding
46
46
47
47
- Fixed size integers are encoded directly
48
48
- Enum discriminants are encoded as u32
49
49
- Lengths and usize are encoded as u64
50
50
51
-
See the documentation of [FixintEncoding](https://docs.rs/bincode/2.0.0-beta/bincode/config/struct.Configuration.html#method.with_fixed_int_encoding) for more information.
51
+
See the documentation of [FixintEncoding](https://docs.rs/bincode/2.0.0-rc/bincode/config/struct.Configuration.html#method.with_fixed_int_encoding) for more information.
0 commit comments