TheDan64 / inkwell

It's a New Kind of Wrapper for Exposing LLVM (Safely)
https://thedan64.github.io/inkwell/
Apache License 2.0
2.22k stars 217 forks source link

Add serde derives for some config datastructures #480

Closed xermicus closed 3 months ago

xermicus commented 4 months ago

Description

Add serde derives for some config datastructures. Otherwise they can not be reused when deriving the compilers configuration (or it has to be implemented manually).

Hidden behind serde feature flag so it should be pretty non-invasive.

Related Issue

How This Has Been Tested

Checklist

xermicus commented 4 months ago

@TheDan64 you assigned this to me - is there anything left for me to get this merged?

TheDan64 commented 4 months ago

Apologies, I am traveling this month and might not have time to review for a few weeks

xermicus commented 4 months ago

No worries, enjoy!

TheDan64 commented 3 months ago

Looks good; but I'd like to just call the feature serde rather than serde-derive as this seems more typical (apparently just making the crate optional is an automatic feature?): https://github.com/uuid-rs/uuid/blob/8c6fc53484e8a374b01d71f311091c8d21893dc3/Cargo.toml#L40 https://github.com/servo/rust-smallvec/blob/55229397eb97a7ced88383182260999fc81c2393/Cargo.toml#L22 https://github.com/indexmap-rs/indexmap/blob/184fe4bfcba20e21242c924220170b98be157d45/Cargo.toml#L21

xermicus commented 3 months ago

@TheDan64 Yeah I definitively agree. Changed so we just have the serde feature