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
Finn Bear edited this page Aug 28, 2025
·
7 revisions
Introduction
A serde integration is gated behind the "serde" feature flag. It is slower, produces
slightly larger output, and (by extension) is not compatible with the native
bitcode::{Encode, Decode}.
Unsupported features
bitcode isn't self-describing, so it doesn't support serde features that rely on self-description:
enum's with #[serde(untagged)] or #[serde(tag = ...)].
Fields with #[serde(skip_serializing_if = ...)], #[serde(default)], etc.
Types like serde_json::Value, which internally serialize different types (numbers, arrays, etc.) without a normal enum discriminant.
The serde version of bitcode only supports up to 256 variants per enum.
Compatibility notes
The serde version omits the flowinfo and scope_id fields of std::net::SocketAddrV6, but the derive version
keeps them.
The serde version supports recursive types, but the derive version (as of version 0.6) does not.