-
Notifications
You must be signed in to change notification settings - Fork 1
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
Generate WIT file from Rust module #2
Conversation
I think you could just check if the target WIT's contents are the same, and not write to the file if so. That way although the macro would always run, it would not change the file times and make the WIT files dirty. |
I'm doing this in zio-k8s/zio-aws code generators, I think :) |
And for publishing, you can just copy the cargo settings and CI from for example https://github.com/golemcloud/golem-wasm-ast - there is an org secret that applies to this repo too for crates.io |
So you mean that macro would also read the file and compare the content with whatever it was trying to write and do not rewrite in case the content is the same? |
Yes that's what I suggest |
I had some difficulties making it work reliably so I opened issue about it - and also few others for visibility. |
This PR introduces capability of a rust macro to generate WIT file from annotated rust module. Some examples are in examples project and readme.