Skip to main content

Beyond Backend

Watch First​

Why This Matters​

Rust engineering transfers across domains because ownership, types, errors, concurrency, and boundaries are shared skills. A learner does not need five separate courses immediately, but they should know where Rust appears beyond web APIs.

What You Will Build​

Build one non-web artifact: a CLI that parses logs or events from the Rust service and produces a summary report.

Concept​

Rust often appears in:

  • CLI tools,
  • parsers,
  • data processing,
  • protocol and network tooling,
  • WebAssembly,
  • embedded systems,
  • FFI boundaries.

Rust Pattern​

For internal tools, make the CLI boring and useful:

use clap::{Parser, Subcommand};

#[derive(Debug, Parser)]
#[command(name = "taskctl")]
struct Cli {
#[command(subcommand)]
command: Command,
}

#[derive(Debug, Subcommand)]
enum Command {
Summarize { input: std::path::PathBuf },
Validate { input: std::path::PathBuf },
}

Good CLIs have clear errors, exit codes, help text, and tests around parsing and behavior.

Practice​

Keep this mistake out of your first implementation.

Do not turn this module into seven separate deep tracks. The purpose is orientation plus one useful artifact.

When parsing, do not reach for parser combinators if simple line parsing is enough. When processing data, do not load huge files into memory if a streaming approach is straightforward.

Keep these concrete mistakes out of your work.

  • Loading entire large files into memory.
  • Producing unclear CLI errors.
  • Using complex parsing libraries for simple formats.
  • Ignoring exit codes.
  • Treating FFI and unsafe boundaries casually.

Use this sequence. Do not move to the next row until you have produced the artifact in the right column.

StepFocusArtifact
CLI tools with ClapCommands, config files, errors, exit codestaskctl CLI
Parsing with nom or winnowLogs, protocols, config formatsParser tradeoff note
Data processingCSV, JSONL, Parquet awareness, PolarsStreaming summary
Protocol and network toolingBinary formats, framing, checksums, typed statesProtocol sketch
WebAssemblyBrowser, plugin, edge use cases, limitsWASM awareness note
no_std and embedded awarenessEmbedded Rust and HALsEmbedded map
FFI awarenessC ABI, safety boundaries, docsFFI boundary checklist

Build this now. Keep each change small enough that you can run cargo check, cargo test, and inspect the diff.

Build taskctl summarize events.jsonl:

  • read JSONL line by line,
  • count jobs by status,
  • report first and last timestamp,
  • return non-zero exit for malformed lines,
  • include tests with small fixture files.

After your own attempt, use another reviewer or an AI tool as a second pass. Accept a suggestion only when you can explain why it preserves the lesson design.

Ask AI to write the log parser. Review whether:

  • it streams input,
  • error messages include line numbers,
  • malformed input is handled deliberately,
  • CLI behavior has tests,
  • dependencies are justified.

You can move on when these statements are true.

  • Is the artifact useful outside the web service?
  • Does it handle large inputs safely?
  • Are errors actionable?
  • Are exit codes meaningful?
  • Is the parsing approach proportional to the format?
  • Are advanced domains treated with appropriate caution?

Curated Resources​

Next Step​

Continue to Macros, Unsafe Rust, and Advanced Escape Hatches.