Why use Rust over Python for CLI?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • serde

    Serialization framework for Rust

  • Rust tends to have CLI libraries that match or exceed their Python counterparts: Take a look at the derive APIs of clap (argument parsing) and Serde (JSON, TOML, YAML, etc.). Note that many things like csv and quick-xml support integrating with Serde's derive API for a better experience than Python's equivalent modules. Rust's ignore crate is like os.walk but with built-in "just flip the switch" support for parsing things like .gitignore and obeying them. Rust gives threaded performance that the multiprocessing module wishes it could match and Rayon often makes parallel processing as easy as replacing .iter() with .par_iter(). etc. etc. etc.

  • cross

    “Zero setup” cross compilation and “cross testing” of Rust crates

  • Rust things are easier to deploy: No virtualenvs vs. gambling with the system-wide packages, no "follow these steps to install". If you stick to pure Rust dependencies or dependencies which support statically linking their C components, a Rust binary is a self-contained executable and, if you specify the -C target-feature=+crt-static compiler flag when targeting Windows and use the *-musl targets when targeting Linux... via cross if necessary, then you'll get a Go-like self-contained binary that can be copied onto any system capable of running binaries with that platform triple with no worries about external dependencies.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • ht

    Friendly and fast tool for sending HTTP requests

  • Then I found a Rust clone: xh. It has almost the same UX. It's fast. Every invocation takes no time. Now I use it every day. It also has some subtle features like it doesn't re-order JSON keys in the response. When I do some DevOps jobs on a Linux server, I also use it because the author provides a musl version, so there is no need to worry about dependencies over newer C libraries.

  • helix

    A post-modern modal text editor.

  • Funny enough, there is an editor written in Rust called helix and its program is called hx.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Super unpopular opinion incoming.

    7 projects | /r/rust | 8 Jun 2023
  • What do you like about Rust?

    4 projects | /r/rust | 10 Sep 2022
  • Creating an AWS Lambda with Rust

    3 projects | /r/rust | 3 Mar 2021
  • Empowering Web Privacy with Rust: Building a Decentralized Identity Management System

    3 projects | dev.to | 9 Apr 2024
  • Timeline of the xz open source attack

    3 projects | news.ycombinator.com | 1 Apr 2024