Refactor RAPx CLI with enhanced argument parsing and help messages#229
Merged
hxuhack merged 9 commits intosafer-rust:mainfrom Mar 2, 2026
Merged
Refactor RAPx CLI with enhanced argument parsing and help messages#229hxuhack merged 9 commits intosafer-rust:mainfrom
hxuhack merged 9 commits intosafer-rust:mainfrom
Conversation
- Added Clap for command-line argument parsing, enhancing usability and consistency with Cargo. - Introduced a new configuration module to manage command options and analysis types. - Removed deprecated help file and integrated help messages directly into the CLI structure. - Streamlined the analysis process by consolidating various analysis options into a unified command structure. - Updated the main execution flow to accommodate new command parsing and analysis initiation. - Removed unused functions and cleaned up the codebase for better maintainability. - Enhanced logging and error handling throughout the application.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces several improvements to the RAPx CLI:
Clapfor argument parsing.rapxto read RAPx-specific arguments from theRAPFLAGSenvironment variable, allowing it to better mimicrustcbehavior. This also lays the groundwork for a future feature enablingrapxto analyze a single Rust source file directly.CARGO_PRIMARY_PACKAGEenvironment variable to determine whetherrapxis running in the rustc wrapper phase. This replaces the previous heuristic-based approach with a more accurate and reliable mechanism.cli::RapxArgsstruct that declaratively defines the CLI structure and associated command-line parameters, serving as the central configuration model for argument parsing and analysis setup.