GithubHelp home page GithubHelp logo

Comments (3)

apatil avatar apatil commented on June 15, 2024 2

@anxiousmodernman thanks for getting back to me. I would love to offer to submit a PR but realistically, my track record shows that I won't get to it anytime soon. :)

IMO the delta between compile-time and runtime checking of API usage correctness increases with the size of the project. I've been involved in one multi-year effort with multiple developers and dozens of API endpoints, and it was hard to be confident that any change to the API wouldn't break something. Compile-time checking of API usage would have been a huge help, and I've found it to be a surprisingly uncommon feature even in safety-forward languages like Rust.

from rocket-yew-starter-pack.

anxiousmodernman avatar anxiousmodernman commented on June 15, 2024

Thank you for the issue! You are correct, this is code duplication. And it could be solved by the method you describe: extracting a 3rd crate of pure data types. Some sort of protocol crate that both server and ui depend on.

Way back, I actually started down the road of having a unified build driven by cargo workspaces, but I ripped it out because I couldn't figure out how to make the cargo web build work (for the ui) in the same invocation as the regular cargo build. c67cda4

I haven't revisited the idea since, because Rocket will give us runtime checking of the shape of the JSON. Not as good as compile-time, but still robust. And, iirc, the name Entry was preserved from the original port of the yew/examples directory. But I'm not pulling in changes from that example, and really my strategy has been to occasionally build this thing and if it fails try to get it working. So at this point unifying the names makes sense.

I'd be interested in a PR that uses a `path = "../common" (or similar) in Cargo.toml to extract the few types that we actually need to share.

FWIW, now that Rocket 0.4 is out, I need to revisit this project anyway.

from rocket-yew-starter-pack.

austinrivas avatar austinrivas commented on June 15, 2024

This thread pretty much describes my interest in rust as a full stack language.

Has there been any additional development on this issue in the repo or other libraries you are aware of?

from rocket-yew-starter-pack.

Related Issues (12)

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.