sloc-report 1.2.2

Source line analysis tool with CLI, web UI, HTML/PDF reports, and CI/CD integration
docs.rs failed to build sloc-report-1.2.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: sloc-report-1.5.74

sloc-report

HTML report rendering and PDF export for oxide-sloc.

Overview

This crate handles all output rendering:

  • render_html(run) -> Result<String> — Askama-templated HTML report with light/dark theme, language charts, per-file breakdown, and warning analysis
  • write_pdf_from_html(html, path) — spawns a locally installed headless Chromium-based browser, polls for file stability, 45 s timeout
  • Browser discovery: checks Chrome, Edge, Brave, Vivaldi, and Opera on Windows and Linux paths
  • Set SLOC_BROWSER env var to override browser path; SLOC_BROWSER_NOSANDBOX=1 passes --no-sandbox (required in Docker)

Usage

This is an internal crate used by the oxide-sloc workspace. It is not intended for use outside this project. See the main project for documentation and releases.

# Install the tool instead:
cargo install oxide-sloc