1[package]
2name = "derive_utils"
3version = "0.14.1" #publish:version
4edition = "2021"
5rust-version = "1.56"
6license = "Apache-2.0 OR MIT"
7repository = "https://github.com/taiki-e/derive_utils"
8keywords = ["enum", "macros", "derive"]
9categories = ["development-tools::procedural-macro-helpers", "rust-patterns"]
10exclude = ["/.*", "/tools"]
11description = """
12A procedural macro helper for easily writing derive macros for enums.
13"""
14
15[package.metadata.docs.rs]
16targets = ["x86_64-unknown-linux-gnu"]
17
18[package.metadata.cargo_check_external_types]
19# The following are external types that are allowed to be exposed in our public API.
20allowed_external_types = [
21 "proc_macro2::*",
22 "quote::*",
23 "syn::*",
24]
25
26[lib]
27doc-scrape-examples = false
28
29# Note: proc-macro2, quote, and syn are public dependencies.
30[dependencies]
31proc-macro2 = "1.0.60"
32quote = "1.0.25"
33syn = { version = "2", features = ["full"] }
34
35[dev-dependencies]
36example_derive = { path = "examples/example_derive" }
37rustversion = "1"
38trybuild = { git = "https://github.com/taiki-e/trybuild.git", branch = "dev" } # adjust overwrite behavior
39
40[lints]
41workspace = true
42
43[workspace]
44resolver = "2"
45members = ["examples/example", "examples/example_derive"]
46
47# This table is shared by projects under https://github.com/taiki-e.
48# It is not intended for manual editing.
49[workspace.lints.rust]
50improper_ctypes = "warn"
51improper_ctypes_definitions = "warn"
52missing_debug_implementations = "warn"
53non_ascii_idents = "warn"
54rust_2018_idioms = "warn"
55single_use_lifetimes = "warn"
56unreachable_pub = "warn"
57# unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV
58[workspace.lints.clippy]
59all = "warn" # Downgrade deny-by-default lints
60pedantic = "warn"
61as_ptr_cast_mut = "warn"
62default_union_representation = "warn"
63inline_asm_x86_att_syntax = "warn"
64trailing_empty_array = "warn"
65transmute_undefined_repr = "warn"
66undocumented_unsafe_blocks = "warn"
67# Suppress buggy or noisy clippy lints
68bool_assert_comparison = { level = "allow", priority = 1 }
69borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286
70doc_markdown = { level = "allow", priority = 1 }
71float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725
72manual_assert = { level = "allow", priority = 1 }
73manual_range_contains = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395
74missing_errors_doc = { level = "allow", priority = 1 }
75module_name_repetitions = { level = "allow", priority = 1 }
76similar_names = { level = "allow", priority = 1 }
77single_match = { level = "allow", priority = 1 }
78single_match_else = { level = "allow", priority = 1 }
79struct_excessive_bools = { level = "allow", priority = 1 }
80struct_field_names = { level = "allow", priority = 1 }
81too_many_arguments = { level = "allow", priority = 1 }
82too_many_lines = { level = "allow", priority = 1 }
83type_complexity = { level = "allow", priority = 1 }
84