Skip to content

Support sarge#2

Merged
YuniqueUnic merged 4 commits into
mainfrom
support-sarge
Dec 16, 2025
Merged

Support sarge#2
YuniqueUnic merged 4 commits into
mainfrom
support-sarge

Conversation

@YuniqueUnic
Copy link
Copy Markdown
Contributor

feat(cli): add support for sarge feature and argument parsing

  • Add sarge as an optional dependency in Cargo.toml
  • Enable sarge feature by default
  • Introduce new module src/cli/sarge.rs to implement argument parsing
  • logic for InputArgs and OutputArgs
  • Implement ArgumentType trait for InputArgs and OutputArgs with
  • Update Cargo.lock to include sarge crate with version 9.0.0

- Add `sarge` as an optional dependency in Cargo.toml
- Enable `sarge` feature by default
- Introduce new module `src/cli/sarge.rs` to implement argument parsing
  logic for `InputArgs` and `OutputArgs`
- Implement `ArgumentType` trait for `InputArgs` and `OutputArgs` with
  placeholder implementations using `todo!()`
- Update Cargo.lock to include `sarge` crate with version 9.0.0
- Introduce `@<path>` syntax to force treating arguments as file paths
- Add `=<content>` syntax for inline in-memory input content
- Support `stdin`, `stdout`, and `stderr` aliases for better CLI ergonomics
- Extend `InputArgs` and `OutputArgs` with helper methods and deref implementations
- Implement argument parsing logic for sarge integration with auto-detection
- Add new I/O providers: `InMemorySource`, `StderrOutput`, and their async counterparts
- Update builders to resolve inputs/outputs using the new conventions
- Include comprehensive tests for resolution logic and CLI argument handling
- Removed "sarge" from the default feature set in `Cargo.toml`
- Moved CLI argument parsing tests to a dedicated module under the "sarge" feature flag
- Added test cases for input/output argument handling in the new `sarge_tests.rs` file
- Updated feature matrix tests to include standalone and combined usage of the "sarge" feature
- Introduce `multiio_sarge` demo binary using the `sarge` argument parser
- Add end-to-end tests covering various input/output scenarios for the new CLI
- Extend feature matrix to include "sarge" capability
- Implement robust comma-aware splitting for repeatable CLI arguments
- Support stdin/stdout alias tokens and explicit stderr output in manual CLI tests
- Add XML roundtrip data fixtures for testing purposes

The new binary provides a user-friendly CLI interface leveraging the sarge crate,
enabling expressive and flexible I/O handling through command-line arguments.
@YuniqueUnic YuniqueUnic enabled auto-merge (rebase) December 16, 2025 14:10
@YuniqueUnic YuniqueUnic merged commit 9c78456 into main Dec 16, 2025
3 checks passed
@YuniqueUnic YuniqueUnic deleted the support-sarge branch December 16, 2025 14:13
@YuniqueUnic YuniqueUnic restored the support-sarge branch December 16, 2025 15:39
@YuniqueUnic YuniqueUnic deleted the support-sarge branch December 16, 2025 15:40
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