Re:TodoMVC in Rust
by steveklabnik on Wednesday September 23, 2015 @11:13AM
(#10265502)
The general workflow with Rust is
$ git clone <foo>
$ cd <foo>
$ cargo run
With something like this, you might want to also use https://github.com/passcod/cargo-watch , which, after installing it, changes that last line to $ cargo watch
and then it will recompile when you change a file, automatically.I haven't been able to test that this project works exactly this way because it looks like they're on an older nightly than I have on my machine, but it looks like that's all you need.
I will be amazed if true! Last time I looked at the emscripten-Rust stack it was a tower of hacks and required a custom-hacked standard library. If that's all abstracted behind cargo build scripts that's awesome, but we're still a ways from having this be elegantly integrated into the Rust system.
It's going to improve rapidly though.
Re:TodoMVC in Rust
by steveklabnik on Wednesday September 23, 2015 @02:17PM
(#10266883)
I think it's gotten better due to recent LLVM changes in emscripten, last I heard, but maybe maybe not. Can't wait until it's just trivial.
Re:TodoMVC in Rust
by timcameronryan on Wednesday September 23, 2015 @01:58PM
(#10266725)
This uses a deeply hacked Rust stack. Take a look at this: https://github.com/tcr/rust-webplatform/blob/master/setup.sh It's also using a version of Rust that's pre-1.0.0.
Progress is being made on making this first class though: https://github.com/rust-lang/rfcs/issues/604
I'm used to working with raw JavaScript, ClojureScript with Figwheel, and Java/xhtml with JSF. Of the three, ClojureScript/Figwheel has given me the smoothest process so far, though I know there are tools for autoreloading raw js as well, just haven't gotten around to using them.