From the course: Rust Programming: From Fundamentals to Advanced Concepts with AI-Assisted Development

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Demo: Creating the library with Cargo

Demo: Creating the library with Cargo

- [Instructor] Oftentimes in Rust and dealing with different projects, you will find a particular situation where you will be working with a project and you might want to split things out or you might want to create things to support other projects. In this case, I have this project called resplit and what it does, and again, the details of these are not tremendously important, but what it does it is a CLI tool that allows you to cut and select certain fields and certain inputs, just like the cut CLI, this is a particular CLI in Linux. And what it does, it allows you to select an incoming string like this one and say I want to split on say a comma like that one. And then I want to get the second field or the first field. So this would probably be split into two. One will be that and the other one will be the rest of the string. So that's what the command line tool does. Let's take a very quick look at what we have here is SRC and we have main.rs and we have the contents of the command…

Contents