Comments (3)
@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.
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.
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)
- Make the build portable
- Upgrade sled
- Rewrite examples when Rocket goes async HOT 1
- Making this repository a Template HOT 3
- Switch to web-sys bindings
- Building Errors
- Get off iovec fork HOT 1
- Upgrade yew/stdweb
- Maud is broken on latest nightly HOT 1
- syn build failure in server crate HOT 2
- Build errors on nightly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocket-yew-starter-pack.