Skip to content

Commit

Permalink
UPDATE for RFC30: Serialization and deserialization (#2186)
Browse files Browse the repository at this point in the history
* commit RFC

* commit

* Delete rfc0023_serialization_and_deserialization.md

* fix formatting

* #1944 (comment)

* #1944 (comment)

* applied grammarly
pre-commit

* better example wip

* FIX

* #1944 (comment)

#1944 (comment)

#1944 (comment)

* add examples for output's builer

* fixes

* fixing unstable feature gate snippet

* Update rfc0028_serialization_and_deserialization.md

Section is deleted in response to the discussion
#1944 (comment)

* file name fix

* Update rfc0030_serialization_and_deserialization.md

#2183 (comment)

* Update rfc0030_serialization_and_deserialization.md
  • Loading branch information
thomas-k-cameron authored Jan 9, 2023
1 parent 76f0fa9 commit 4af30b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion design/src/rfcs/rfc0030_serialization_and_deserialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ However, we believe that cfg approach ensure users won't enable this feature by

## Feature Gate for Serialization and De-serialization
`Serde` traits are implemented behind feature gates.
`Serialize` is implemented behind `serialize`, while `Deserialize` is implemented behind `deserialize`.
`Serialize` is implemented behind `serde-serialize`, while `Deserialize` is implemented behind `serde-deserialize`.
Users must enable the `unstable` feature to expose those features.

We considered giving each feature a dedicated feature gate such as `unstable-serde-serialize`.
In this case, we will need to change the name of feature gates entirely once it leaves the unstable status which will cause users to make changes to their code base.
We conclude that this brings no benefit to the users.

Furthermore, we considered naming the fature-gate `serialize`/`deserialize`.
However, this way it would be confusing for the users when we add support for different serialization/deserialization framework such as `deser`.
Thus, to emphasize that the traits is from `serde` crate, we decided to name it `serde-serialize`/`serde-deserialize`

## Keeping both features behind the same feature gate
We considered keeping both features behind the same feature gate.
There is no significant difference in the complexity of implementation.
Expand Down

0 comments on commit 4af30b6

Please sign in to comment.