Skip to content

Try to erase all serde/json implicit configurations #10

@swfsql

Description

@swfsql

Currently there are many code/implementation assumptions related to the de/serialization of the args and the return type. Only json is available and there is no way to change it.

Before having an additional configuration for it, such as adding borsh, one possibility is to try making no assumptions at all about what kind of de/serialization will be used, besides that it will be related to Args and Return structures with named fields, and that they must be able convert into/from bytes.

It may be possible to require all structural attributes to be explicitly declared by the user, such that each attribute (eg. #[derive(Deserialize)] must be passed in from attributes on the methods.
With this, many other configurations would be potentially allowed. Then after that, some helper attributes can be created to make common configurations implicit, such as attaching an attribute related to json on a single top-item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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