Unverified Commit 4af30b68 authored by Thomas Cameron's avatar Thomas Cameron Committed by GitHub
Browse files

UPDATE for RFC30: Serialization and deserialization (#2186)

* commit RFC

* commit

* Delete rfc0023_serialization_and_deserialization.md

* fix formatting

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054637168

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054632202

* applied grammarly
pre-commit

* better example wip

* FIX

* https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054632468

https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054818444

https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1054820192

* 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
https://github.com/awslabs/smithy-rs/pull/1944#discussion_r1061577656

* file name fix

* Update rfc0030_serialization_and_deserialization.md

https://github.com/awslabs/smithy-rs/pull/2183#discussion_r1064573442

* Update rfc0030_serialization_and_deserialization.md
parent 76f0fa96
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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.