Since I'm now actively interested in #Rust, I'll take the liberty to sometimes post n00b questions.
(Because a) this may well help others, and b) I firmly believe asking seemingly innocent questions along the way is about the best way to learn.)
One: Why do we have
Two: Is there a way to install and pre-build dependencies? I want a build Docker container for my unit tests. Ideally, I'll update it nightly, so that Github actions that run my tests would just
For this "two" to work I need my
Hints, anyone? Thanks in advance!
PS: I'm a two-spaces indent guy (and 120 characters line width). Is this totally frowned upon, or would a non-insignificant share of Rust lovers be okay with this?
(Because a) this may well help others, and b) I firmly believe asking seemingly innocent questions along the way is about the best way to learn.)
One: Why do we have
vec! but not str!? We've got .to_string() and String::from(). Presumably, a cleverly built macro would pick one wisely, and reading str!(...) would be very natural for someone who's used to vec!(...). So, there must be a reason, but I can't comprehend it.Two: Is there a way to install and pre-build dependencies? I want a build Docker container for my unit tests. Ideally, I'll update it nightly, so that Github actions that run my tests would just
docker pull from ghrc the most recent { Rust toolchain + basic pre-cloned and pre-built } modules.For this "two" to work I need my
Dockerfile with the build container to do something like cargo install (?) and cargo prebuild (?) for a bunch of [dependencies] from multiple Cargo.toml files. I've tried that, and Cargo gives me trouble, primarily because it can't "just" download & install packages without the "main binary". I dare say, npm install has never given me this vibe as long as package.json is there. So there absolutely must be something I'm doing wrong.Hints, anyone? Thanks in advance!
PS: I'm a two-spaces indent guy (and 120 characters line width). Is this totally frowned upon, or would a non-insignificant share of Rust lovers be okay with this?
🔥2