-
-
Notifications
You must be signed in to change notification settings - Fork 892
Closed
Labels
Description
servo/rust-url#327 proposes depending on multiple versions of serde at the same time, in order to add support for new (semver-incompatible) versions without removing support for old ones (which would be a breaking change). This is done by not depending on the serde crate directly, but depending on serde1 which itself depends on serde = "1.0" and re-exports pub use serde::*;.
However this prevents using derive because the code generated by derive includes its own extern crate serde;. I’d like an attribute to be added to control the name of the crate in the generated extern crate code. Something like:
#[derive(Serialize, Deserialize)]
#[serde(crate_name = "serde1")]
enum {
Foo,
Bar(u32),
Baz(String),
}Reactions are currently unavailable