-
Notifications
You must be signed in to change notification settings - Fork 353
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
Consider moving schema boilerplate from examples
to a binary crate
#755
Comments
I was thinking about it at some point and I don't think I found any reason not to. I guess that the initial reason why it put in examples was that it requires less setup - literally: no setup, while as binary you have to play around with Cargo.toml and you may not want to read this doc for POC, and then you leave it. I have the same issue with |
I thought so too, but actually I tested this today and Rust autodetects the binary crate if it's in |
I didn't even realize it's an |
@hashedone I opened a ticket for the |
In contracts, we have a tradition of keeping
schema.rs
inexamples/
. Sinceschema.rs
is not an example at all (it generates an important build artifact!), it's a confusing layout and probably not the proper place for this code.With very minimal changes, it's possible to move
examples/schema.rs
tosrc/bin/schema.rs
and have it work pretty much the same - withcargo schema
orcargo run --bin schema
generating the schemas.What do you think?
The text was updated successfully, but these errors were encountered: