Skip to content

feat: initialize Rust workspace with core and cli crates#2

Merged
PrasanthYT merged 1 commit intomainfrom
feature/init-cli-skeleton
Mar 2, 2026
Merged

feat: initialize Rust workspace with core and cli crates#2
PrasanthYT merged 1 commit intomainfrom
feature/init-cli-skeleton

Conversation

@PrasanthYT
Copy link
Contributor

Overview

This PR introduces the foundational architecture of Scanr, including the Rust workspace structure, CLI command skeleton, CI pipeline, distribution channels, and structured documentation.

It establishes the technical base required for implementing dependency scanning, SBOM generation, and vulnerability investigation in future milestones.


Architecture Setup

Rust Workspace

Created a workspace-level Cargo.toml with:

  • scanr-core — core logic layer (currently placeholder)
  • scanr-cli — CLI interface layer

This separation enforces modularity and prepares for scalable feature expansion.


CLI Skeleton (clap Integration)

Implemented command structure using clap:

scanr scan <path>
scanr sbom generate
scanr sbom diff <old> <new>

Additional functionality:

  • scanr --help
  • scanr --version
  • Placeholder core hook via lib.rs
  • Commands execute without panic

This establishes a stable command surface for future feature implementation.


CI Pipeline

Added and validated GitHub Actions workflow (ci.yml):

  • Triggers:

    • push
    • pull_request
    • workflow_dispatch
  • Build step:

    • cargo build --workspace --release

Workflow syntax verified locally.


Distribution Channels

Aligned installer structure to defined channels:

  • installers/install.sh (curl-based install)

  • installers/npm/

    • package.json
    • bin/scanr.js
  • installers/homebrew/scanr.rb

  • installers/aur/PKGBUILD

  • installers/README.md for channel documentation

Removed unused bun channel for scope clarity.


Documentation (MkDocs)

Rewritten documentation structure:

  • mkdocs.yml navigation
  • docs/index.md
  • docs/cli.md
  • docs/core.md
  • docs/installation.md
  • docs/development.md

Validation:

mkdocs build --strict

Build passes successfully.


Git Configuration

Updated .gitignore:

  • /target/
  • Cargo.lock
  • /site/

Ensures clean repository hygiene.


Validation Checklist

  • cargo build --workspace --release passes
  • CLI commands execute without panic
  • mkdocs build --strict passes
  • CI workflow syntax validated locally

Remaining step:

  • Push branch and confirm one successful GitHub Actions run.

Impact

  • No breaking changes
  • No runtime feature logic added yet
  • Establishes stable foundation for all future milestones
  • Improves maintainability and architectural clarity

Why This Matters

This milestone transitions Scanr from repository setup to a structured, extensible CLI security tool.

It satisfies:

  • Clean architecture principles
  • Proper CI enforcement
  • Clear documentation standards
  • Scalable distribution strategy

@PrasanthYT PrasanthYT merged commit 7dff6e4 into main Mar 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant