candid icon indicating copy to clipboard operation
candid copied to clipboard

Nat & Int do not support binary encoders

Open rupansh-sekar-yral opened this issue 10 months ago • 0 comments

Nat & Int use deserialize_any in their de-serialization implementation: https://github.com/dfinity/candid/blob/master/rust/candid/src/types/number.rs#L155 https://github.com/dfinity/candid/blob/master/rust/candid/src/types/number.rs#L205

most binary encoding libraries do not support deserialize_any, example

bincode: https://github.com/bincode-org/bincode postcard: https://github.com/jamesmunns/postcard

Is using BigUint/BigInt the only way?

rupansh-sekar-yral avatar Feb 25 '25 20:02 rupansh-sekar-yral