Posts Tagged - from-java-to

From Java to Rust

Relevant Post: Initial Steps with Rust

Relevant changes to adapt to Rust, coming from a Java background. Contains information about Rust’s environment and the language structures.

For code snippets on how to do specific things as we do in Java, check my Rust experience post

Rust Environment

Cargo

Cargo is Rust’s dependencies manager and most projects should be created and managed with it, for easier use.
Commands I used so far:

cargo new hello_cargo creates a new project.
Cargo.toml is a file which cargo creates and it contains the project’s metainformation and its dependencies.

cargo build builds binaries from source code.
cargo run directly compiles and starts the programm.

cargo install --path . installs from binaries to your system. Useful to use and test my own programs.
--force needed if it already was installed

Read More