-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
didc -t rs should implement serialize for records and variants #324
Comments
We plan to add a config struct to control the generated code, similar to the protobuf builder: https://docs.rs/prost-build/latest/prost_build/struct.Config.html#method.type_attribute |
Would this help when I am using |
The CLI can take a config file as input, haven't thought about the format of the config file yet. |
Could we also add an option to choose if |
Yep, all Candid types should be able to map to a user specified type. |
* adds typedoc to agent, configures for lerna * wip: github action for release * docs: improving agent-js README * docs: copies licenses to packages and updates authentication README * docs: adds homepage and keywords for npm * chore: removes references to docs canisters * chore: reverting browser in authentication package.json * docs: lowercase keywords and docs deploy instructions * adding links to hosted docs * reverts release.yml and licenses.txt * merge conflicts in package.json * apache 2
Duplicate of #255 |
Is your feature request related to a problem? Please describe.
I am trying to use the generated Rust Candid types for use in Azle (TypeScript CDK), but I am running into this error when I try to have a record type as a parameter:
the trait Serialize is not implemented for
User`.Describe the solution you'd like
For a simple Candid type like this:
The Rust code currently looks like this:
It would be nice if
Serialize
could also be in the derive macro:Describe alternatives you've considered
This could also be set as a feature in
Cargo.toml
.Additional context
It would be nice to have the option of configuring things like this on the types output by
didc -t rust
. I am happy to do a PR, though I believe this fix is probably pretty simple.The text was updated successfully, but these errors were encountered: