As someone who has read The Rust Official Book twice and was eager to gain hands-on experience with Rust, I was excited to try 'Command-Line Rust'. However, I found the book to be somewhat disappointing.
While the book did cover some Rust concepts, it heavily focused on using an outdated version of the clap crate, which, in my opinion, was not the best approach to learning the language.
Since I was seeking practical experience with Rust, I was hoping for a more comprehensive introduction to the language. Unfortunately, 'Command-Line Rust' seemed to be too fixated on clap, rather than on Rust itself.
Even if someone is interested specifically in the clap crate, this book may not be helpful due to its outdated content.
Do you have any suggested follow-along resources, other than Rust by Tutorials or Rustlings?
Are you talking about this tutorial?
I see no mention of clippy
I believe OP is referring to this book, and glancing at the contents it looks like they have confused “
clap” with “
clippy”. The book in question uses
clap = "2.33" whereas the latest version is
4.2.1 as of this writing.
Actually, looking at the public repository containing the source code examples
it looks like they also published a
clap4 version of everything, and even a version using their new
derive macros instead.
The "main" branch has the original source code using version 2.33 of the
clap crate, which was the latest version while I was writing the book. The "clap_v4" branch has been updated to use the builder pattern of
clap version 4 along with clippy suggestions as of Rust 1.67.
clap_v4_derive branch is not mentioned in the README, but exists, too)
Take a look at zero to production:
And if you are interested in generating WebAssembly, Brian Sletten's book - Definitive Guide
I know the branch exists but the book is on older version.
If I need to read source code there are many other complete repos like uutils/coreutils.
Thats not what I want
If you've read The Book then you're more than ready to get started with whatever you want to do.
Just pick a project you want to make, search crates.io for relevant libraries, and use their API docs and examples to figure out how to fit the pieces together (check for code blocks in the docs or look in the repo for an
Honestly, after a certain point the most efficient way to become proficient is to strike out on your own and figure things out for yourself, rather than following the happy path in a guide someone else has curated.
I'm not new to programming and currently work as an Android developer, so I'm familiar with the phenomenon known as tutorial hell. However, I want to expand my knowledge to include a solid understanding of Rust architecture. Although I've read a book on the topic, it only covers theoretical concepts and lacks a practical, hands-on approach. Since my current knowledge of architecture is limited to Android and OOP, I believe I would benefit from a more interactive learning experience.
While it's true that reading the official Rust book is sufficient for getting started with coding in Rust, I'm looking for resources that focus specifically on developing good architecture.
*I think I should quit learning the *Rsut language as its going towards becoming worst version of Oracle.
It killed my motivation.
Don't give up. It isn't as hard as it appears. Are you familiar with "c"?
I don't know what language "android developers" use. I tried myself, but getting up the android toolkit, packaging an apk so I could write my program in 'c' was too confusing for me to figure out. If you can figure out all those details on how to build something for Android, you will have no problem getting a command line app, running.
Do you have a specific type of program you want to make? Or a specific question about the architecture?
Can I ask some questions. Break it down so we can get an understanding of what you don't understand. I for one, do not want rust newbies turning away because of confusion and frustration.
- Are you familiar with "c" and
int main(int argc, char *argv)
Do you understand the argc and argv parts? Do you know what those are and how to use them? Rust has access to that data, but we get it from another way.
"command line" basically means a program that can run in the standard "c" program way. When it is compiled, the operating system can call it the same as it could call a normal "c" program. This is a bit different than how a program is "run" on an android platform. Do you have familiarity with the differences between android apps and "c" style command line programs?
If you understand "c" main() and arc, argv then you can focus on the book's section on command line arguments
After you do some "typing" you will start to want to have a shortcut. That is when you must learn to clap. That can be strange and confusing. Hard to understand.
What I did was pretty much give up on understanding the details. Go with the basics. Download the clap source, copy and paste some code from the "examples" directory.
You really don't know what's happening in the rust foundation for trademark. Do you ?
Context for others: e.g. this tweet; I only found out about this topic myself yesterday due to this YouTube video.
I just skimmed through that draft. Better not become official since literally you cannot have Rust in your crate name or website domain.
I was trying to stay on topic. I thought this was a help thread regarding your disappointment with the command line learning resources you read.
Please note the "Categories" when you make a new thread. Posting to "help" can make us think you are asking for "help"
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.