- Learning multiple languages enhances one’s understanding of computing. All languages tackle the same problems in different ways. Some leverage trade-offs enabling them to better solve specific computing problems than others. Seeing different approaches to the same challenges increases your understanding of the concepts.
- Rust is beloved by its developers. It scored highly on Stack Overflow’s 2019 developer survey. The most loved language was Rust, with 83.5% of developers saying they loved it. Python was tied for 2nd at 73.1% with TypeScript.
- Rust is an LLVM language, Python is not. Per Wikipedia, “The LLVM compiler infrastructure project is a set of compiler and toolchain technologies, which can be used to develop a front end for any programming language and a back end for any instruction set architecture.” It seems Rust opens up modularity to mesh with a bunch of other LLVM languages. Side note: LLVM started at my alma mater, the University of Illinois at Urbana-Champaign 😃 ILL 🔶🔷
- Rust plays well with WebAssembly. AKA Wasm, a new standard introduced in 2015 that allows compilation of high performance browser or Desktop applications. I am still grappling with why Wasm is getting so much hype, but it seems to be a big deal. Rust opens doors to Wasm compatibility. Python is Wasm capable as well but I am getting the impression there is something in Rust’s design that makes it useful for compiling to Wasm.
- It is a modern language, which surfaced in 2010, that is still coming of age. This is both good and bad. But the good here is modern language design. Its creator saw the shortcomings of countless languages that have come before it. An enthusiastic community has already made Rust a good programming language option in a short time.
Getting Started with Rust
The Getting Started page contains a simple curl command for downloading and installing Rust via “Rustup”, an installer and version management tool. This will install Cargo, Rust’s package manager. (Think pip for Pythonistas.) I used my Linux environment on my Chromebook, but there’s a Windows executable available as well.
curl https://sh.rustup.rs -sSf | sh
The Cargo Book provides documentation for the package manager. I like the “First Steps with Cargo” section because it gets you immediately into creating and running a “build” by entering a few short commands in the terminal.
Create a New Build
cargo new hello_world
cd Into Your hello_world Program
Note the creation of a .toml manifest, and simple Rust program that prints “Hello, world!”.
Compile and Run Your Program
Now, on to learning the syntax, which is often compared to languages like C and C++. First stop for me will be “the book”, The Rust Programming Language. Cheers 🙂