News for hackers. Stuff that matters.
Re:How I Start: Rust by xena on Tuesday March 17, 2020 @12:56PM (#22607019)
Author of the post here, feel free to ask me anything!
Re:How I Start: Rust by correct_horse on Tuesday March 17, 2020 @03:55PM (#22609558)
Why did you pick Rocket? For example, Actix-Web is a viable alternative that works on a stable compiler.
Re:How I Start: Rust by camillovisini on Tuesday March 17, 2020 @04:35PM (#22610060)
Great article, thank you! A suggestion: The code examples were somewhat hard to read. Perhaps you could add syntax highlighting (e.g. via prism or highlight.js).
Re:How I Start: Rust by hrombach on Tuesday March 17, 2020 @02:47PM (#22608589)
It was really helpful doing some first steps with rust.

One suggestion: add a warning for macOS users that psutil::host::uptime is not available on macOS. I had to figure that out myself and it was quite frustrating.

I figure you didn't know that, and it's not like the article claims otherwise, but it would be useful to add I think.

Re:How I Start: Rust by chidg on Friday March 27, 2020 @03:38AM (#22701020)
Thanks, I had the same issue - and only figured it out because this comment came up in Google results for the error message.
Re:How I Start: Rust by xena on Tuesday March 17, 2020 @04:32PM (#22610025)
I didn't know that! I've recently switched over to NixOS as my daily driver. I'll see what I can do to fix that for the future.
Re:How I Start: Rust by seaish on Tuesday March 17, 2020 @01:35PM (#22607575)
Why no `cargo run`?
Re:How I Start: Rust by xena on Tuesday March 17, 2020 @01:42PM (#22607681)
I'm used to doing stuff with WebAssembly, that is beyond the reach of `cargo run` most of the time.
Re:How I Start: Rust by CryZe on Tuesday March 17, 2020 @02:09PM (#22608076)
Actually even for wasm you can make `cargo run` work. You just need to write a script for it and use it as the target runner. Especially for WASI this is great where you can just specify wasmtime as the runner and then cargo test / bench / run all work perfectly fine.
Re:How I Start: Rust by hamaluik on Tuesday March 17, 2020 @04:48PM (#22610242)
I was actually just searching for this the other day but couldn’t quite figure it out. Do you have any guides on doing just this? Thanks!
Re:How I Start: Rust by artursapek on Tuesday March 17, 2020 @01:00PM (#22607074)
Do you write code in that color scheme? (Dark green everything on a black background)
Re:How I Start: Rust by xena on Tuesday March 17, 2020 @01:17PM (#22607313)
No, I'm not sure why the gruvbox theme I use has that for code examples. Here's what my coding view looks like: https://i.imgur.com/oWFlmgB.png