In this lesson we’ll create a new Rust project using the cargo new
command and take a look at some of the generated files.
Instructor: [00:00] The most convenient way to create a new Rust project is by using the Cargo package manager and its new commands. The new command takes the name of a project. Once we execute it, we'll see that it has generated a bunch of files including a Git repository, a src directory and a Cargo.toml file.
[00:28] The src directory only includes a main.rs file. If we take a look at its contents, we'll see it has a simple main() function that outputs "Hello, world!"
[00:42] The Cargo file is a package file that specifies the name of the project, its version, the author's name and its email address and the edition or version of the Rust programming language. Additionally, we can specify other configuration values such as dependencies or dev-dependencies.
Hi!
bat
is kinda like cat
on steroids :)
And it's written in Rust! https://github.com/sharkdp/bat
bat
is kinda likecat
on steroids :) And it's written in Rust! https://github.com/sharkdp/bat
What about tree
? Same deal?
Hey Matthew,
tree
is another command that is available for different platforms. If you're on Mac you can install it via brew install tree
(assuming you have homebrew installed).
Wow, what that
bat
command is? More beautiful thancat