Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Bash to Rust: From Zero

Pragmatic AI Labs via Coursera

Overview

AI, Data Science & Cloud Certificates from Google, IBM & Meta — 50% Off
One plan covers every Professional Certificate on Coursera. 50% off Coursera Plus Annual for 10 days only — price increases June 17.
Unlock All Certificates
Bash to Rust: From Zero is a hands-on conversion course for engineers, sysadmins, and data engineers who already write shell scripts and want to graduate to Rust for production-grade automation. You will learn how to translate common Bash idioms (pipes, redirects, glob expansion, process substitution, exit codes, signal handling, environment variables) into idiomatic Rust using crates like std::process::Command, clap for argument parsing, anyhow and thiserror for error handling, and tokio for async I/O. The course walks through real migration scenarios: replacing fragile shell pipelines with reliable Rust CLIs, building cross-platform automation that no longer depends on coreutils versions, packaging a single static binary for distribution, and structuring projects so that they can be tested, profiled, and maintained by a team. You will also learn when to keep using Bash (one-off glue) and when to invest in Rust (anything that gets re-run, shared, or shipped to production). By the end of the course, you will be able to migrate a non-trivial shell script to Rust, replace it in production, and reason about correctness, performance, and portability trade-offs.

Syllabus

  • Shell as the Weakest Link in Data Pipelines
    • Shell is where data pipelines silently rot — $RANDOM session ids collide on retry and bare mkdir fails the second time, but ShellCheck stays silent because those bugs live in the script's relationship with time and disk, not its syntax. This module installs bashrs with one cargo install, then teaches you to read a bashrs lint finding (SEC013/REL005) and the five-dimension bashrs score gate (≥ 8.0/10 overall).
  • Linting, Auditing, and Grading Shell Code
    • Linting alone is necessary but not sufficient. This module pairs ShellCheck with bashrs lint to expose the determinism and idempotency findings ShellCheck silently approves, then teaches you to read bashrs audit grade summaries and apply the five-dimension score gate to Dockerfile RUN steps so container images stay reproducible.
  • Purifying Shell to Idempotent Layers
    • Move from messy shell to deterministic, idempotent layers using bashrs purify. You will rewrite scripts so they can be run twice without surprises, push idempotency to the right layer (script, container, or config tool), and learn to verify safe re-execution end to end.
  • Transpiling Bash to Rust with bashrs build
    • Use bashrs build to author install and bootstrap scripts in a constrained Rust subset and emit POSIX shell that runs identically across sh, dash, ash, and bash. Master the intrinsics, the determinism contract, and the cross-shell CI matrix that proves portability.
  • Property-Based Testing and Deterministic Simulation
    • Move from spot-check tests to property-based testing and deterministic simulation. Use bashrs test to fuzz inputs and exercise idempotency invariants, then run the same script under a deterministic clock/PRNG harness to reproduce flakes. Lock in safe re-execution proofs before shipping.

Taught by

Noah Gift

Reviews

Start your review of Bash to Rust: From Zero

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.