Top "Rust" questions

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

How can I implement Rust's Copy trait?

I am trying to initialise an array of structs in Rust: enum Direction { North, East, South, West, } struct RoadPoint { direction: …

rust traits
Benchmarking programs in Rust

How is it possible to benchmark programs in Rust? For example, how would I get execution time of program in …

time benchmarking rust
How do I invoke a system command in Rust and capture its output?

Is there a way to invoke a system command, like ls or fuser in Rust? How about capturing its output?

rust
How to iterate through a Hashmap, print the key/value and remove the value in Rust?

This should be a trivial task in any language. This isn't working in Rust. use std::collections::HashMap; fn do_…

hashmap rust iteration mutability
How do you make a range in Rust?

The docs don't say how, and the tutorial completely ignores for loops.

loops for-loop range rust
Show u8 slice in hex representation

I need to convert &[u8] to a hex representation. For example [ A9, 45, FF, 00 ... ]. The trait std::fmt::UpperHex is …

hex rust slice
Why can't I store a value and a reference to that value in the same struct?

I have a value and I want to store that value and a reference to something inside that value in …

lifetime borrow-checker rust
How can I build multiple binaries with Cargo?

I'd like to make a project with a daemon and a client, connecting through a unix socket. A client and …

rust rust-cargo
In Rust, is there a way to iterate through the values of an enum?

I come from a Java background and I might have something like enum Direction { NORTH, SOUTH, EAST, WEST} and I …

enums iteration rust
Unable to compile Rust hello world on Windows: linker link.exe not found

I have installed Rust on windows from Rust installation page. After installation I tried running the "hello world" program but …

compiler-errors installation rust linker-errors build-tools