Started using Rust for scripting

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • xshell

  • 2) xshell makes the common tasks of shelling out to other processes and massaging file system simpler

  • rustscript

    Use Rust as a scripting language

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • evcxr

  • Check out the execvr Jupyter kernel.

  • trunc_filenames

    Minimal recursive "truncate file/directory names to meet requirements" tool

  • I actually just did that earlier today: https://github.com/ssokolow/trunc_filenames

  • cargo-xtask

  • 1) In "serous" projects, there's always a need for some amount of scripting. Rather than crating a scripts directory with .sh files and worrying how grep on mac is different from grep on linux, it is much better for the team's velocity to write the thing in Rust (https://twitter.com/id_aa_carmack/status/989951283900514304). The xtask pattern (I stress that this is a pattern, rather than a library or a cargo subcomand) helps achieve nice UX for this.

  • xflags

  • 3) xflags is my preferred way to parse CLI arguments for such scripts. It's not good at all, but, for me, it's the best for the task at the moment.

  • config

    configuration.nix is better than dot files (by matklad)

  • 4) For scripts you put for everyday use in ~/bin, I've found busybox style multipurpose binary invaluable. You put all your scripts into a single Rust binary, and than hard-link this binary under different names in PATH, so that the first argv is actually the name of subcommand. Here's how the infra works for my scripts, and here's an example script.

  • 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
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