Better common derives

The following crate [1] has some awesome work by @mcarton and implements custom derives for standard traits like Debug, Clone, PartialEq etc. Their big benefit is the extra serde-style features of being able to ignore fields or change the generated bounds.

https://github.com/mcarton/rust-derivative

Unfortunately, this crate seems to be unmaintained right now, it has some simple minor compatibility fixes that need to be done. Has anyone been thinking of picking it up? Does there exist a similar feature set somewhere else?

2 Likes

Hi

Does this crate satisfy your requirement?

Looks like a cool crate, but no, since it doesn't implement derives for common traits like Debug, Clone, PartialEq etc, it's not really what I'm thinking of.

@colin_kiegel do you think it is a feature we should add to the rust-derive-builder crate?

@bluss you can submit a feature request/proposal there if that's the only thing you think is missing from your requirements.

@dylan.dpc Thx. I think it's better to keep things in different crates. derive_builder is already complex enough and for that reason I would like to keep it focused on deriving builders. :wink:

3 Likes