zingolabs / zcashrpc

An async zcashd RPC client rust crate.
MIT License
2 stars 1 forks source link

Procedurally Generated Types Must be Reified as Non-Macro Rust Types #35

Closed zancas closed 3 years ago

zancas commented 3 years ago

No, I have miscommunicated.

Writing RPCResponse types down by hand.. i.e. typing each one out with one's keyboard, does not scale.

Therefore they need to be programmatically generated. We need a process that takes JSON as an input, and produces human-readable (ideally) standard Rust code. The output is not a call to a macro.. the output is Rust code.

It's fine.. probably the best way, to have a macro call be part of the code generation, but the macro call... is not the final product. To put it another way the end result is not a TokenStream the end result is a String-that-is-written-to-a-file.

The template for the pattern is the behavior of the "protobuf" system.

I know I have tried to express this idea both verbally and in keybase several times, but somehow I am not making it clear.

Perhaps I will make it it's own issue, then I will just repeatedly reference the issue.

zancas commented 3 years ago

Alright, we are doing this!