evestera / json_typegen

Tools and libraries to create types for Rust, Kotlin, TypeScript and Python from JSON samples
https://typegen.vestera.as
Apache License 2.0
268 stars 26 forks source link

Stabilize shared crate interface for use from build.rs #23

Closed acfoltzer closed 3 years ago

acfoltzer commented 3 years ago

In the docs for json_typegen_shared, I read the following:

If you want to use this crate directly, and thus care about its stability, please open an issue to let me know.

And here I am :slightly_smiling_face:

I'm working on a project where in addition to a step to generate Rust types from JSON, I need to also generate the JSON itself. This lends itself to doing the generation in a build script so that I can orchestrate both steps, without having to bring in a Makefile or something to drive the CLI.

So far the json_typegen_shared::codegen interface has been suitable for my needs, so I don't have any requests or problems to report. Thank you for the great library!

evestera commented 3 years ago

Thanks for the heads-up! It was actually pretty well timed as I was considering what would have been a breaking change to json_typegen_shared::codegen in the next release. I can't promise no breaking changes at all in the future, but I'll keep in mind that there is someone using the codegen function at least, so I'll e.g. create a new function for the mentioned change instead doing it as a breaking change.