Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 40 additions & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ members = [
repository = "https://github.com/clap-rs/clap"
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.74" # MSRV
rust-version = "1.74" # MSRV
include = [
"build.rs",
"src/**/*",
"Cargo.toml",
"LICENSE*",
"README.md",
"examples/**/*"
"examples/**/*",
]

[workspace.lints.rust]
Expand All @@ -32,6 +32,8 @@ unsafe_op_in_unsafe_fn = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
# For testing with default_field_values
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nightly)'] }

[workspace.lints.clippy]
bool_assert_comparison = "allow"
Expand Down Expand Up @@ -63,7 +65,7 @@ invalid_upcast_comparisons = "warn"
large_digit_groups = "warn"
large_stack_arrays = "warn"
large_types_passed_by_value = "warn"
let_and_return = "allow" # sometimes good to name what you are returning
let_and_return = "allow" # sometimes good to name what you are returning
linkedlist = "warn"
lossy_float_literal = "warn"
macro_use_imports = "warn"
Expand Down Expand Up @@ -112,13 +114,7 @@ name = "clap"
version = "4.5.40"
description = "A simple to use, efficient, and full-featured Command Line Argument Parser"
categories = ["command-line-interface"]
keywords = [
"argument",
"cli",
"arg",
"parser",
"parse"
]
keywords = ["argument", "cli", "arg", "parser", "parse"]
repository.workspace = true
license.workspace = true
edition.workspace = true
Expand All @@ -136,49 +132,53 @@ features = ["unstable-doc"]
shared-version = true
tag-name = "v{{version}}"
pre-release-replacements = [
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
{file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1},
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly=1},
{file="CHANGELOG.md", search="<!-- next-url -->", replace="<!-- next-url -->\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly=1},
{file="CITATION.cff", search="^date-released: ....-..-..", replace="date-released: {{date}}"},
{file="CITATION.cff", search="^version: .+\\..+\\..+", replace="version: {{version}}"},
{file="src/lib.rs", search="blob/v.+\\..+\\..+/CHANGELOG.md", replace="blob/v{{version}}/CHANGELOG.md", exactly=1},
{ file = "CHANGELOG.md", search = "Unreleased", replace = "{{version}}", min = 1 },
{ file = "CHANGELOG.md", search = "\\.\\.\\.HEAD", replace = "...{{tag_name}}", exactly = 1 },
{ file = "CHANGELOG.md", search = "ReleaseDate", replace = "{{date}}", min = 1 },
{ file = "CHANGELOG.md", search = "<!-- next-header -->", replace = "<!-- next-header -->\n## [Unreleased] - ReleaseDate\n", exactly = 1 },
{ file = "CHANGELOG.md", search = "<!-- next-url -->", replace = "<!-- next-url -->\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly = 1 },
{ file = "CITATION.cff", search = "^date-released: ....-..-..", replace = "date-released: {{date}}" },
{ file = "CITATION.cff", search = "^version: .+\\..+\\..+", replace = "version: {{version}}" },
{ file = "src/lib.rs", search = "blob/v.+\\..+\\..+/CHANGELOG.md", replace = "blob/v{{version}}/CHANGELOG.md", exactly = 1 },
]

[features]
default = [
"std",
"color",
"help",
"usage",
"error-context",
"suggestions",
]
debug = ["clap_builder/debug", "clap_derive?/debug"] # Enables debug messages
unstable-doc = ["clap_builder/unstable-doc", "derive"] # for docs.rs
default = ["std", "color", "help", "usage", "error-context", "suggestions"]
debug = ["clap_builder/debug", "clap_derive?/debug"] # Enables debug messages
unstable-doc = ["clap_builder/unstable-doc", "derive"] # for docs.rs

# Used in default
std = ["clap_builder/std"] # support for no_std in a backwards-compatible way
std = ["clap_builder/std"] # support for no_std in a backwards-compatible way
color = ["clap_builder/color"]
help = ["clap_builder/help"]
usage = ["clap_builder/usage"]
error-context = ["clap_builder/error-context"]
suggestions = ["clap_builder/suggestions"]

# Optional
deprecated = ["clap_builder/deprecated", "clap_derive?/deprecated"] # Guided experience to prepare for next breaking release (at different stages of development, this may become default)
deprecated = [
"clap_builder/deprecated",
"clap_derive?/deprecated",
] # Guided experience to prepare for next breaking release (at different stages of development, this may become default)
derive = ["dep:clap_derive"]
cargo = ["clap_builder/cargo"] # Disable if you're not using Cargo, enables Cargo-env-var-dependent macros
cargo = [
"clap_builder/cargo",
] # Disable if you're not using Cargo, enables Cargo-env-var-dependent macros
wrap_help = ["clap_builder/wrap_help"]
env = ["clap_builder/env"] # Use environment variables during arg parsing
unicode = ["clap_builder/unicode"] # Support for unicode characters in arguments and help messages
string = ["clap_builder/string"] # Allow runtime generated strings
unicode = [
"clap_builder/unicode",
] # Support for unicode characters in arguments and help messages
string = ["clap_builder/string"] # Allow runtime generated strings

# In-work features
unstable-v5 = ["clap_builder/unstable-v5", "clap_derive?/unstable-v5", "deprecated"]
unstable-v5 = [
"clap_builder/unstable-v5",
"clap_derive?/unstable-v5",
"deprecated",
]
unstable-ext = ["clap_builder/unstable-ext"]
unstable-styles = ["clap_builder/unstable-styles"] # deprecated
unstable-styles = ["clap_builder/unstable-styles"] # deprecated
unstable-derive-ui-tests = []
unstable-markdown = ["clap_derive/unstable-markdown"]

Expand All @@ -193,7 +193,11 @@ clap_derive = { path = "./clap_derive", version = "=4.5.40", optional = true }
trybuild = "1.0.91"
rustversion = "1.0.15"
# Cutting out `filesystem` feature
trycmd = { version = "0.15.3", default-features = false, features = ["color-auto", "diff", "examples"] }
trycmd = { version = "0.15.3", default-features = false, features = [
"color-auto",
"diff",
"examples",
] }
jiff = "0.2.3"
snapbox = { version = "0.6.16", features = ["term-svg"] }
shlex = "1.3.0"
Expand Down
20 changes: 10 additions & 10 deletions clap_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
name = "clap_derive"
version = "4.5.40"
description = "Parse command line argument by defining a struct, derive crate."
categories = ["command-line-interface", "development-tools::procedural-macro-helpers"]
keywords = [
"clap",
"cli",
"parse",
"derive",
"proc_macro"
categories = [
"command-line-interface",
"development-tools::procedural-macro-helpers",
]
keywords = ["clap", "cli", "parse", "derive", "proc_macro"]
repository.workspace = true
license.workspace = true
edition.workspace = true
Expand All @@ -30,12 +27,15 @@ proc-macro = true
bench = false

[dependencies]
syn = { version = "2.0.8", features = ["full"] }
# https://github.com/dtolnay/syn/pull/1870
syn = { version = "2.0.8", features = [
"full",
], git = "https://github.com/dtolnay/syn", rev = "7680cb0c1d7cbf812118081dbcdfe5bc67083488" }
quote = "1.0.9"
proc-macro2 = "1.0.69"
heck = "0.5.0"
pulldown-cmark = { version = "0.13.0", default-features = false, optional = true}
anstyle = {version ="1.0.10", optional = true}
pulldown-cmark = { version = "0.13.0", default-features = false, optional = true }
anstyle = { version = "1.0.10", optional = true }

[features]
default = []
Expand Down
Loading
Loading