ystero-dev / hampi

Rust ASN.1 Toolkit
Other
44 stars 17 forks source link

asn1_codecs_derive REAL support is not implemented #111

Closed gth828r closed 11 months ago

gth828r commented 11 months ago

It looks like in #100 REAL support was added in the codecs, but I overlooked the need to modify asn1_codecs_derive. Encode and decode currently both result in todo!() calls.

We need to implemented the REAL support for asn1_codecs_derive.

gth828r commented 11 months ago

I have never really implemented or looked at how to write Rust macro code, but perhaps I can take a look at what was done for other primitive types in asn1_codecs_derive and see if I can implement something similar for REAL. I (possibly naively) assume this is mostly a matter of just plumbing things to get it to work.

gabhijit commented 11 months ago

Sorry!! that's my bad!! This should've been caught in the code review! You can take a look at how it is done for boolean here. Something similar should just work.

You just have to replace todo! code with code like above! Let me know if you face any issues implementing this!

gth828r commented 11 months ago

No worries, I probably should have noticed it too. I have opened a PR with changes that seems to fix the issue I was encountering before in my project.

gabhijit commented 11 months ago

Released crate version v0.6.1. The fix is available in v0.6.1.