Full disclosure: this blog post is also me bragging about a neat little program I wrote. But I do think it will be worth reading for anyone into rust: I'll talk about what makes rust good, and its domain of use.

pi is a command-line tool for starting new projects. It's quite easy to use:

pi new haskell $PROJECT_NAME

So far, it only has four built-in templates (more to come), but you can also put your own templates in a directory to make your own:


The ease of use in part comes from some amazing libraries: clap is unconscionably easy to use. colored is dang nice too.

It also comes from rust's speed. None of the built-in templates take more than 8ms on my aging laptop. Speed makes for good command-line programs! One of the reasons I didn't want to use cookiecutter was that it took nearly 400ms to initialize a Haskell project. That just feels clunky.

Speed was the main reason I didn't write this in Haskell. The project uses templating languages pretty heavily, and languages are a particular strength of Haskell. But Haskell's runtime makes command-line tools just plain slower. Rust is a lot better than either Haskell or python at getting consistent performance. I don't have any insight why (just benchmark results), but it makes for a smoother command-line tool when execution times don't balloon to three times the average.

I will note one thing that is perhaps a counter-indication to using rust for a project: rust is not a scripting language. Python can be a great scripting language. But scripting languages have a way of creeping up on you; writing maintainable code becomes unnecessarily hard.

So I'd recommend rust for any command-line tool. It's that good. Unless you have a specific library you need in perl, python, Haskell, nim; rust will be faster and it will be more maintainable. 1

1: While I can't say it will be better than C, ion, ripgrep, and alacritty impressively attest to the speed you can get by using rust over C.