Git Product home page Git Product logo

Comments (3)

ucarion avatar ucarion commented on July 19, 2024

The crate you're referring to, known internally to this repo as jtd_codegen_core, isn't meant to be generally usable. The version published on Crates.io is from a previous design of the jtd-codegen codebase, where all code generation targets were in a single tool.

I'm afraid I can't at this time commit to maintaining a Rust interface to the jtd-codegen system. My recommendation, at least for now, is that you instead depend on the jtd-codegen binary, even if you're ultimately invoking it from build.rs.

Sorry for the inconvenience. I won't be yanking the published crate, because I'm sure some folks have come to depend on it. But it's not the recommended path, and I don't think using the crate directly is a documented option anywhere.

from json-typedef-codegen.

AdamLeyshon avatar AdamLeyshon commented on July 19, 2024

That's a bummer.
Being able to invoke from build.rs was a really nice feature to have, just like prost_build for Protobuf and Diesel migrations/schema inferal, I'll have to find another way to compile all my JTDs before cargo build

from json-typedef-codegen.

NotizMe avatar NotizMe commented on July 19, 2024

I don't know the Rust ecosystem at all, so I might have asked the wrong question. I'm actually just looking for a convenient way to get the jtd-codegen binary on my workstation and build agents.

With go I would do something along these lines

go run github.com/jsontypedef/json-typedef-codegen/cmd/cli

and the Go compiler would download the version noted in my go.mod file, compile it and run it.

In most other cases we'd use a package manager:

  • language specific like npm for front-end, pip for python ...
  • distribution specific like apt for ubuntu, dnf for centOS ...
  • or a snap app

I'm just looking for a more reproducible and maintainable way to get the jtd-codegen binary. Anything that isn't "download the binary from this website and to update it, just overwrite it" basically 😉

from json-typedef-codegen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.