MartinKavik / seeder

Set up Seed app and start dev server by running one command
https://seed-rs.org/
MIT License
44 stars 2 forks source link

Thoughts #1

Open TatriX opened 4 years ago

TatriX commented 4 years ago

1) I switched to seed-quickstart with cargo make watch and the only thing I miss is reload after compilation. 2) Because rust compiles slowly and I save files often, I quite often want to disable watcher and compile code explicitly. I like to think about this as follows: when I code I call cargo check via hotkey quite often from my editor (or use inline warnings/errors). When I'm satisfied I call cargo build again via hotkey and this is my F5. 3) Most of the time your web app will need to communicate to some backend server. For example I'm using rocket. It would be really nice if I could serve client via rocket somehow. So I only need to cargo run my server and it will automatically invoke/serve/proxy client via Seeder.

TatriX commented 4 years ago

Another thing: ideally I would like to have something like vue-devtools: So I can inspect state and messages in runtime.

MartinKavik commented 4 years ago

So about live reload. It can either reload the whole page or patch the code live. The best thing ever I used for live reload is Indium. Emacs Javascript Ide. It uses chrome debug protocol. And this protocol has a feature: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setScriptSource You may used it via devtools. Basically you can edit your js source and it will patch it live, recalling functions if needed. It can even update closures, which is impossible if you just patch prototypes. The huge problem with it is that it doesn't work with es modules, so it's practically useless now. And so I wonder, can we make it work in a similar way? It feels possible to do so, because of elm architecture. (@TatriX)

arn-the-long-beard commented 3 years ago

Hello, I think I might had some discussions about redux_dev_tools and seed_hooks as well for state-management many months ago as well. Just wanted to mention it because we might be several people thinking about this kind of concepts.