@ThePrimeagen@deno_land Very cool 😎 yeah I wouldn't see why not! If you need max efficiency and only deserialization then hand rolling makes sense. Deku is nice to use, at the cost of some efficiency (in some cases, not all)
@ThePrimeagen Thing to note from example: `wee_alloc` is unmaintained, but still usable, I think? deku does require some allocations. Apart from that it should be pretty straight forward.
@nikolamilovic5@ThePrimeagen@ziademarcus Yeah in many cases if you just need to serialize/deserialize and don't care about the format there's better alternatives (anything serde, protobuf, etc)
@ThePrimeagen@ziademarcus deku was initially designed to parse binary "things" / modify / write back out. Think network protocols (IP header has bit-level granularity for ex) or reverse engineering / fuzzing / etc. Many use cases.
@fasterthanlime used deku for parsing ELF! https://t.co/yfkmnR0FBz
@fasterthanlime This is huge! Congrats. Looking forward to see what you create! I've been following your work on rustls w/ ktls and http experiments, awesome stuff 😎
@luke_pighetti@ThePrimeagen Checkout the 'assert' attribute, you could get your data as a string and assert every character is A-Z, or maybe a custom 'reader' and 'writer' attributes is the way to go here.
@ThePrimeagen@luke_pighetti In this case, since you don't own Uuid, nor do you own DekuRead, you can't implement a foreign trait on a foreign type. You'll need to wrap it in a type you own. Remember the 'orphan rule's https://t.co/oTDIOyw3Tv
@ThePrimeagen@luke_pighetti Yep! You can impl the traits yourself for your type if you need finer grained control, such as things the existing attributes wouldn't handle. (Btw all the derive does is just implements the traits for you!)
https://t.co/AUn6y29wWJ