Get rid of the the manual candid file for Rust

It would be really nice if Rust canisters had their did files taken care of automatically, just like Motoko files.

1 Like

I think it’s doable today but not very accessible, and obviously not automated.

When I asked about candid_method and export_service in this issue @chenyan said:

Yeah, that is … used for auto-generating did files

We are still trying to figure out the best way to integrate this into the CDK. For now, the best document is probably the test: candid/rust/candid/tests/types.rs at master · dfinity/candid · GitHub

Has there been any update on this? It would be really nice to not have to provide a Candid file for custom or Rust canisters. This would especially simplify the Azle and Kybra compilers, as we could remove the entire TypeScript to Candid and the future Python to Candid compilers and replace them with a TypeScript/Python to Rust compiler, which we already kind of need. Then once the Rust is in place, it would be nice for the system to just use that information.

4 Likes