jsontypedef / json-typedef-codegen

A CLI tool that generates code from JSON Typedef schemas
https://jsontypedef.com/docs/tools/jtd-codegen
MIT License
160 stars 31 forks source link

Publish as WASM Module #41

Closed barlock closed 3 years ago

barlock commented 3 years ago

I would like to use jtd-codegen via node. It should be possible to generate the wasm bindings with wasm-pack and publish them to npm.

ucarion commented 3 years ago

My recommendation is to use jtd-codegen as a CLI tool, or to create a WASM build yourself. I cannot maintain a WASM build at this time.

barlock commented 3 years ago

Hmmm, with the closing of #37 I think it's impossible for me to create it myself without forking. Could you reconsider exporting a library interface?

My Rust is bad so I'm not sure the difficulty in publishing a crate, but I imagine that the library and the wasm bindings would actually be one in the same which is convenient.

ucarion commented 3 years ago

I'm afraid my stance has not changed since #37 or prior times this has been asked. It's quite difficult to expose this library as a useful Rust crate. Maintaining a stable CLI interface is much easier than maintaining a stable Rust one.

ucarion commented 3 years ago

You don't need this codebase to be maintained as a Rust crate to get this done. I suspect you can instead fork this repo and create a build yourself. If you so choose, you could also maintain an NPM package. All of this is permissible under the MIT license.