Skip to content

Nat & Int do not support binary encoders #599

@rupansh-sekar-yral

Description

@rupansh-sekar-yral

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions