Skip to main content

generate_snapshot_registration

Function generate_snapshot_registration 

Source
fn generate_snapshot_registration(input: &DeriveInput) -> TokenStream
Expand description

Generate the R_init registration of the type’s carrier class (#2186): a #[no_mangle] function and its MX_ALTREP_REGISTRATIONS entry, which the wasm registry lists by symbol. The derive can’t tell whether the type is serde, so every type gets one; it registers the class only when the type’s snapshot probe found serde.