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

feat: add serde feature for non-native serialization #1141

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

vlopes11
Copy link
Contributor

@vlopes11 vlopes11 commented Nov 8, 2023

Currently, serde serialization is enabled only if native feature is available. This aims to protect ZK targets to be bloated with functionality it won't use, increasing the binary size; hence, verification cost.

However, serde is required outside ZK space, and without native features. One example is the wallet where we will perform JSON deserialization of a runtime call message inside of a WASM environment. WASM cannot have native (because it derives tokio), and must have serde available.

This commit splits serde from native, making native optional for such functionality, but preserves the mandatory serde implementations under native.

Currently, serde serialization is enabled only if `native` feature is
available. This aims to protect ZK targets to be bloated with
functionality it won't use, increasing the binary size; hence,
verification cost.

However, serde is required outside ZK space, and without native
features. One example is the wallet where we will perform JSON
deserialization of a runtime call message inside of a WASM environment.
WASM cannot have native (because it derives tokio), and must have serde
available.

This commit splits `serde` from `native`, making `native` optional for
such functionality, but preserves the mandatory serde implementations
under `native`.
@vlopes11 vlopes11 mentioned this pull request Nov 8, 2023
14 tasks
@vlopes11 vlopes11 added this pull request to the merge queue Nov 8, 2023
Merged via the queue into nightly with commit f66d45b Nov 8, 2023
14 checks passed
@vlopes11 vlopes11 deleted the vlopes11/feature/serde branch November 8, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants