-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generate code from json schema? #19
Comments
Yes. The idea of generating code like I think it is more reasonable for The glTF 2.0 implementation is in the |
Thanks for the answer. I also had the feeling it might be a little more complex than |
Hmm, difficult choice. What I like about |
I should add what I said above only applies to glTF 1.0. It would be very reasonable to use gfx for glTF 2.0. |
Random thought: It might be worth using the schema to validate the correctness of the hand written 'raw' data structures. |
How would you do that? Btw, the glTF-Sample-Models repo now contains a few more models updated to 2.0 and e.g. |
Thanks for reporting. I've updated the sample models in |
Recently I've been experimenting with generating Rust code from the current 2.0 schema. I think writing a code generator would be too troublesome at this stage due to the complexity of the schema. Even if there exists a smart person that could write a correct generator tonight, whatever code is generated is unlikely to be correct tomorrow, and worse still would probably fail silently. |
https://www.khronos.org/news/press/khronos-releases-gltf-2.0-specification 😃 |
Another thing: I noticed one relevant recent spec change under Scenes:
So this could be removed I guess. |
I think it's important to provide all the data from the glTF. Whether the user decides to make use of the default scene index is up to them. |
Well, the part of the spec saying that the default scene (if not specified) is 0 was removed, so the default here should now be EDIT: For reference: https://github.com/KhronosGroup/glTF/pull/958/files |
Thanks, I've made the change. Whatever 2.0-specific code is in the incoming branch should be ready for a |
Hi,
Have you considered generating the Rust code from the official json schema?
I did a quick experiment with
schemafiy
, but immediately ran into Marwes/schemafy#3 (panic on external references).I got the idea initially from https://github.com/slack-rs/slack-rs-api/tree/master/codegen. They use a custom generator to generate bindings to the Slack API. It works pretty well there (I've worked with the generated code).
Side question: How far along is the 2.0 branch?
The text was updated successfully, but these errors were encountered: