Skip to content

Conversation

@jgarzik
Copy link
Contributor

@jgarzik jgarzik commented Dec 21, 2025

No description provided.

@jgarzik jgarzik requested a review from Copilot December 21, 2025 02:47
@jgarzik jgarzik self-assigned this Dec 21, 2025
@jgarzik jgarzik added the enhancement New feature or request label Dec 21, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds three POSIX C development utilities (cflow, ctags, and cxref) to the posixutils-rs project, along with supporting infrastructure changes.

Purpose: Implement POSIX-compliant C source code analysis tools that generate call flow graphs (cflow), tag files for editors (ctags), and cross-reference tables (cxref). These utilities leverage a newly exported library interface from the existing pcc (POSIX C compiler) crate.

Key Changes:

  • Creates a library interface (cc/lib.rs) to share the C parser infrastructure across utilities
  • Implements three new utilities with comprehensive integration tests
  • Improves m4 test infrastructure to handle parallel test execution and flexible binary paths

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
cc/lib.rs New library interface exposing C parser, tokenizer, and related infrastructure for use by cflow, ctags, and cxref
cc/cflow.rs Implementation of cflow utility that generates C-language flowgraphs showing function call relationships
cc/ctags.rs Implementation of ctags utility that creates tag files for vi/ex editors, recognizing functions, typedefs, and macros
cc/cxref.rs Implementation of cxref utility that generates cross-reference tables showing symbol definitions and uses
cc/Cargo.toml Adds library target and three new binary targets for the new utilities
cc/tests/integration.rs Adds test module declarations for the three new utilities
cc/tests/cflow/mod.rs Integration tests for cflow covering basic operation, depth limits, reverse mode, and output format
cc/tests/cflow/test.c Test fixture C source file for cflow tests
cc/tests/ctags/mod.rs Integration tests for ctags covering basic tagging, index mode, append mode, and sorted output
cc/tests/ctags/test.c Test fixture C source file for ctags tests
cc/tests/cxref/mod.rs Integration tests for cxref covering symbol detection, definitions, silent mode, and output files
cc/tests/cxref/test.c Test fixture C source file for cxref tests
lib/utils.tsv Registers the three new utilities in the project's utility index
README.md Moves cflow, ctags, and cxref from "Stage 0 - Not started" to completed Development utilities
m4/tests/integration_test.rs Improves test infrastructure with proper workspace detection, race-free cargo builds using Once, and support for both debug and release binaries

@jgarzik jgarzik merged commit fc4ad9f into main Dec 21, 2025
4 checks passed
@jgarzik jgarzik deleted the updates branch December 21, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants