#github-actions #classroom #education #cli #autograder

build autograder-setup

Rust CLI that generates GitHub Classroom autograder workflows for Rust assignments

5 stable releases

Uses new Rust 2024

2.2.7 Oct 27, 2025
2.2.6 Oct 8, 2025
2.2.5 Oct 3, 2025

#48 in Build Utils

Download history 227/week @ 2025-09-28 241/week @ 2025-10-05 27/week @ 2025-10-12 6/week @ 2025-10-19 94/week @ 2025-10-26

101 downloads per month

MIT license

100KB
2.5K SLoC

autograder-setup

Latest release   Downloads   Release status   Build   Docs

A tiny Rust CLI that bootstraps GitHub Classroom autograding for Rust projects.

πŸš€ Currently deployed in Boston University’s Intro to Rust course (130+ students, 1000+ student repos).

Key Features

  • Fast setup β€” go from repo β†’ Classroom-ready assignment in under 60 seconds.
  • Flexible outputs β€” grading tables copied to clipboard or written directly to your README.
  • Optimized CI β€” precompiled YAMLs (no runtime parsing) for faster, cheaper runs.
  • Instructor-friendly CLI β€” init, build, table, reset cover the full workflow.

How it Works

  • init β€” scans for Rust tests and builds .autograder/autograder.json.
  • build β€” converts that config into a ready-to-run GitHub Actions workflow at .github/workflows/classroom.yaml.
  • table β€” generates a Markdown grading table for READMEs, keeping grading criteria transparent.
  • reset β€” cleans up generated files for a fresh start.

Keeps autograding setup simple for instructors while making grading criteria clear for students.


Table of Contents


Releases

Installation

If you already have Rust installed:

cargo install autograder-setup

Check installation:

autograder-setup --version

Option B β€” Download a prebuilt binary

Precompiled binaries are available on the latest GitHub release:
https:github.com/JoeyRussoniello/rust-autograder-setup/releases/latest

OS / Target Archive Notes
macOS (x86_64-apple-darwin) .tar.gz Extract and install to /usr/local/bin
Windows (x86_64-pc-windows-gnu) .zip Extract and move autograder-setup.exe to your PATH

See the docs for detailed OS-specific instructions:

Quickstart

# Show top-level help
autograder-setup --help

# 1) Scan src/ recursively and create .autograder/autograder.json
autograder-setup init

# 2) (Optional) Edit tests/autograder.json to adjust points/timeouts

# 3) Generate the GitHub Actions workflow
autograder-setup build
# -> .github/workflows/classroom.yaml

For command-specific flags:

autograder-setup init --help
autograder-setup build --help
autograder-setup table --help
autograder-setup reset --help

Usage

For a full CLI guide and usage instructions, see the Complete Documentation

Repository Structure

.
β”œβ”€β”€ Cargo.lock                           # Cargo dependency lockfile (generated; checked in for reproducible builds)
β”œβ”€β”€ Cargo.toml                           # Crate metadata and dependencies
β”œβ”€β”€ LICENSE                              # Project license
β”œβ”€β”€ README.md                            # Basic installation and usage guide (this file)
β”œβ”€β”€ docs-book                            # Complete mdbook documentation
β”‚   β”œβ”€β”€ book.toml
β”‚   └── src
β”‚       β”œβ”€β”€ README.md
β”‚       β”œβ”€β”€ SUMMARY.md
β”‚       β”œβ”€β”€ commands
β”‚       β”‚   β”œβ”€β”€ build.md
β”‚       β”‚   β”œβ”€β”€ init.md
β”‚       β”‚   β”œβ”€β”€ reset.md
β”‚       β”‚   └── table.md
β”‚       β”œβ”€β”€ faq.md
β”‚       β”œβ”€β”€ installation.md
β”‚       β”œβ”€β”€ json-schema.md
β”‚       β”œβ”€β”€ quickstart.md
β”‚       β”œβ”€β”€ releases.md
β”‚       └── repository-structure.md
└── src
    β”œβ”€β”€ cli                              # CLI subcommands and orchestration
    β”‚   β”œβ”€β”€ build                        # `autograder-setup build` β€” render workflow YAML from autograder.json
    β”‚   β”‚   β”œβ”€β”€ build_functions.rs       # Preamble, YAML helpers, commit-count script writer, small utilities
    β”‚   β”‚   β”œβ”€β”€ mod.rs                   # Subcommand entry + YAMLAutograder builder (ties everything together)
    β”‚   β”‚   β”œβ”€β”€ steps.rs                 # Hand-assembled YAML step emitters (CommandStep / ReporterStep)
    β”‚   β”‚   └── tests.rs                 # Unit tests for YAML rendering and build behavior
    β”‚   β”œβ”€β”€ init                         # `autograder-setup init` β€” scan tests and write `.autograder/autograder.json`
    β”‚   β”‚   β”œβ”€β”€ functions.rs             # High-level constructors for AutoTests (clippy/commit count/test count)
    β”‚   β”‚   β”œβ”€β”€ mod.rs                   # Subcommand entry and pipeline glue
    β”‚   β”‚   β”œβ”€β”€ scan                     # Module for AST parsing and test case discovery
    β”‚   β”‚   β”‚   β”œβ”€β”€ mod.rs
    β”‚   β”‚   β”‚   └── tests.rs
    β”‚   β”‚   └── tests.rs                 
    β”‚   β”œβ”€β”€ mod.rs                       # Top-level CLI wiring (arg parsing, subcommand dispatch)
    β”‚   β”œβ”€β”€ reset                        # `autograder-setup reset` β€” remove generated files
    β”‚   β”‚   β”œβ”€β”€ mod.rs                   # Subcommand entry
    β”‚   β”‚   └── tests.rs                 # Safety checks for deleting generated artifacts
    β”‚   β”œβ”€β”€ table                        # `autograder-setup table` β€” generate student-facing Markdown table
    β”‚   β”‚   └── mod.rs                   # Subcommand entry and table rendering
    β”‚   └── tests.rs                     # Cross-subcommand/integration-style tests for the CLI layer
    β”œβ”€β”€ main.rs                          # Binary entrypoint; delegates to `cli`
    β”œβ”€β”€ types                            # Core data model for the autograder
    β”‚   β”œβ”€β”€ command_makers.rs            # Per-variant command builders (cargo test/clippy/test-count/commit-count)
    β”‚   └── mod.rs                       # `AutoTest { meta, kind }`, `TestMeta`, `TestKind` + Markdown row impl
    └── utils
        β”œβ”€β”€ mod.rs                       # Shared helpers: path walking, slug/id, yaml_quote, replace_double_hashtag, etc.
        └── tests.rs                     # Unit tests for utilities

Upcoming Features

  • Additional CLI improvements and configuration options

Dependencies

~1.6–9MB
~183K SLoC