Top "Rust" questions

Rust is a systems programming language without a garbage collector focused on three goals: safety, speed, and concurrency.

What's the de-facto way of reading and writing files in Rust 1.x?

With Rust being comparatively new, I've seen far too many ways of reading and writing files. Many are extremely messy …

file-io rust
How to uninstall Rust that was installed via rustup?

I installed Rust on my Ubuntu 16.04 machine through curl https://sh.rustup.rs -sSf | sh as can be seen on …

rust rustup
How can I generate a random number within a range in Rust?

Editor's note: This code example is from a version of Rust prior to 1.0 and is not syntactically valid Rust 1.0 code. …

random rust rust-obsolete
How can I get the current time in milliseconds?

How can I get the current time in milliseconds like I can in Java? System.currentTimeMillis()

rust
Is there a faster/shorter way to initialize variables in a Rust struct?

In the following example, I would much prefer to assign a value to each field in the struct in the …

rust
How do you pass a Rust function as a parameter?

Can I pass a function as a parameter? If not, what is a good alternative? I tried some different syntaxes …

rust
Best way to concatenate vectors in Rust

Is it even possible to concatenate vectors in Rust? If so, is there an elegant way to do so? I …

vector rust concatenation
How to access command line parameters?

The Rust tutorial does not explain how to take parameters from the command line. fn main() is only shown with …

command-line rust
Split a module across several files

I want to have a module with multiple structs in it, each in its own file. Using a Math module …

module rust
How to index a String in Rust

I am attempting to index a string in Rust, but the compiler throws an error. My code (Project Euler problem 4, …

string indexing rust