Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could you elaborate on what Piet and Druid are, perhaps with a few links? I assume you don't mean the esolang[0].

[0] https://esolangs.org/wiki/Piet




Thanks! Looks very interesting, going to watch the video about Druid linked in the README.MD later[0].

And no worries, it's very easy to forget not everyone is introduced!

Anyway, to actually engage with your point: I can see the appeal of an all-Rust framework: good typing system + high performance (both in speed and low memory use, ideally) sounds fantastic!

So out of curiosity: how do you think hot swapping would be handled? I'm asking this who has not dived into Rust at all and only observed it with interest from a distance.

For starters, I understand Rust has fairly slow compilation times, no? Or is that only true for optimized code and do we have fast debug options?

Similarly, hot swapping requires maintaining state. With JS that's not too difficult because you don't worry about memory layout: as long as the high-level structure and names are the same the code works fine (it just kills the JIT optimizations).

With WASM, that goes out the window: add or remove a field to your struct and all offsets change. Rust may guarantee no memory leaks, but that is not the same as guaranteeing that a snapshot of the memory state of one Rust program works on a different one.

I guess some kind of "export to/import from JavaScript based representation" glue code that runs every hot reload could work, but that sounds like it could really freeze the browser when hot-reloading the big frameworks.

[0] https://www.youtube.com/watch?v=4YTfxresvS8 would be funny if I forgot to include links myself at this point :p


Had to look up hot swapping, to be honest I dont think the experience will be as good as it would be for dynamic languages like Dart / Javascript.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: