build(ariadne): vendor clap

This commit was merged in pull request #30.
This commit is contained in:
alexion committed 2026-09-08 19:48:37 -04:00
1 parent e6af135702
commit 8855b6d379
681 files changed
+400416

No files matched your search

@@ -0,0 +1,7 @@
//! # Example: cargo subcommand (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/cargo-example.rs")]
//! ```
//!
#![doc = include_str!("../../examples/cargo-example.md")]
@@ -0,0 +1,7 @@
//! # Example: cargo subcommand (Derive API)
//!
//! ```rust
#![doc = include_str!("../../examples/cargo-example-derive.rs")]
//! ```
//!
#![doc = include_str!("../../examples/cargo-example-derive.md")]
@@ -0,0 +1,7 @@
//! # Example (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/escaped-positional.rs")]
//! ```
//!
#![doc = include_str!("../../examples/escaped-positional.md")]
@@ -0,0 +1,7 @@
//! # Example (Derive API)
//!
//! ```rust
#![doc = include_str!("../../examples/escaped-positional-derive.rs")]
//! ```
//!
#![doc = include_str!("../../examples/escaped-positional-derive.md")]
+7
View File
@@ -0,0 +1,7 @@
//! # Example: find-like CLI (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/find.rs")]
//! ```
//!
#![doc = include_str!("../../examples/find.md")]
+7
View File
@@ -0,0 +1,7 @@
//! # Example: git-like CLI (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/git.rs")]
//! ```
//!
#![doc = include_str!("../../examples/git.md")]
@@ -0,0 +1,7 @@
//! # Example: git-like CLI (Derive API)
//!
//! ```rust
#![doc = include_str!("../../examples/git-derive.rs")]
//! ```
//!
#![doc = include_str!("../../examples/git-derive.md")]
+65
View File
@@ -0,0 +1,65 @@
// Contributing
//
// New examples:
// - Building: They must be added to `Cargo.toml` with the appropriate `required-features`.
// - Testing: Ensure there is a markdown file with [trycmd](https://docs.rs/trycmd) syntax
// - Link the `.md` file from here
//! # Documentation: Cookbook
//!
//! Typed arguments: [derive][typed_derive]
//! - Topics:
//! - Custom `parse()`
//!
//! Custom cargo command: [builder][cargo_example], [derive][cargo_example_derive]
//! - Topics:
//! - Subcommands
//! - Cargo plugins
//! - custom terminal [styles][crate::Command::styles] (colors)
//!
//! find-like interface: [builder][find]
//! - Topics:
//! - Position-sensitive flags
//!
//! git-like interface: [builder][git], [derive][git_derive]
//! - Topics:
//! - Subcommands
//! - External subcommands
//! - Optional subcommands
//! - Default subcommands
//! - [`last`][crate::Arg::last]
//! - Configurable command aliases
//!
//! pacman-like interface: [builder][pacman]
//! - Topics:
//! - Flag subcommands
//! - Conflicting arguments
//! - Visualizing help output changes through snapshot testing
//!
//! Escaped positionals with `--`: [builder][escaped_positional], [derive][escaped_positional_derive]
//!
//! Multi-call
//! - busybox: [builder][multicall_busybox]
//! - Topics:
//! - Subcommands
//! - hostname: [builder][multicall_hostname]
//! - Topics:
//! - Subcommands
//!
//! repl: [builder][repl], [derive][repl_derive]
//! - Topics:
//! - Read-Eval-Print Loops / Custom command lines
pub mod cargo_example;
pub mod cargo_example_derive;
pub mod escaped_positional;
pub mod escaped_positional_derive;
pub mod find;
pub mod git;
pub mod git_derive;
pub mod multicall_busybox;
pub mod multicall_hostname;
pub mod pacman;
pub mod repl;
pub mod repl_derive;
pub mod typed_derive;
@@ -0,0 +1,7 @@
//! # Example: busybox-like CLI (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/multicall-busybox.rs")]
//! ```
//!
#![doc = include_str!("../../examples/multicall-busybox.md")]
@@ -0,0 +1,7 @@
//! # Example: hostname-like CLI (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/multicall-hostname.rs")]
//! ```
//!
#![doc = include_str!("../../examples/multicall-hostname.md")]
+10
View File
@@ -0,0 +1,10 @@
// The included source defines a snapshot test.
#![allow(clippy::test_attr_in_doctest)]
//! # Example: pacman-like CLI (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/pacman.rs")]
//! ```
//!
#![doc = include_str!("../../examples/pacman.md")]
+5
View File
@@ -0,0 +1,5 @@
//! # Example: Command REPL (Builder API)
//!
//! ```rust
#![doc = include_str!("../../examples/repl.rs")]
//! ```
@@ -0,0 +1,4 @@
//! # Example: REPL (Derive API)
//!
//! ```rust
#![doc = include_str!("../../examples/repl-derive.rs")]
@@ -0,0 +1,35 @@
//! # Example: Custom Types (Derive API)
//!
//! **This requires enabling the [`derive` feature flag][crate::_features].**
//!
//! ## Implicit [`Arg::value_parser`][crate::Arg::value_parser]
//!
//! ```rust
#![doc = include_str!("../../examples/typed-derive/implicit.rs")]
//! ```
//!
#![doc = include_str!("../../examples/typed-derive/implicit.md")]
//!
//! ## Built-in [`TypedValueParser`][crate::builder::TypedValueParser]
//!
//! ```rust
#![doc = include_str!("../../examples/typed-derive/builtin.rs")]
//! ```
//!
#![doc = include_str!("../../examples/typed-derive/builtin.md")]
//!
//! ## Custom parser function
//!
//! ```rust
#![doc = include_str!("../../examples/typed-derive/fn_parser.rs")]
//! ```
//!
#![doc = include_str!("../../examples/typed-derive/fn_parser.md")]
//!
//! ## Custom [`TypedValueParser`][crate::builder::TypedValueParser]
//!
//! ```rust
#![doc = include_str!("../../examples/typed-derive/custom.rs")]
//! ```
//!
#![doc = include_str!("../../examples/typed-derive/custom.md")]