Cargo.toml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. [workspace]
  2. resolver = "2"
  3. members = ["lib", "macros", "tools/uniffi-bindgen"]
  4. default-members = ["lib", "macros"]
  5. # Commented lints are in a newer Clippy version or tied to unstable and we want
  6. # to try them ASAP.
  7. #
  8. # We enable all groups by default except `Restriction` from which we explicitly
  9. # pick the rules we want to enable.
  10. [workspace.lints.clippy]
  11. # Pedantic
  12. pedantic = "warn"
  13. similar_names = { level = "allow", priority = 1 }
  14. too_many_lines = { level = "allow", priority = 1 }
  15. # Restriction
  16. alloc_instead_of_core = { level = "warn", priority = 1 }
  17. allow_attributes = { level = "warn", priority = 1 }
  18. allow_attributes_without_reason = { level = "warn", priority = 1 }
  19. arithmetic_side_effects = { level = "warn", priority = 1 }
  20. as_pointer_underscore = { level = "warn", priority = 1 }
  21. as_underscore = { level = "warn", priority = 1 }
  22. big_endian_bytes = { level = "warn", priority = 1 }
  23. cfg_not_test = { level = "warn", priority = 1 }
  24. clone_on_ref_ptr = { level = "warn", priority = 1 }
  25. create_dir = { level = "warn", priority = 1 }
  26. dbg_macro = { level = "warn", priority = 1 }
  27. default_numeric_fallback = { level = "warn", priority = 1 }
  28. deref_by_slicing = { level = "warn", priority = 1 }
  29. doc_include_without_cfg = { level = "warn", priority = 1 }
  30. doc_paragraphs_missing_punctuation = { level = "warn", priority = 1 }
  31. empty_drop = { level = "warn", priority = 1 }
  32. empty_enum_variants_with_brackets = { level = "warn", priority = 1 }
  33. empty_structs_with_brackets = { level = "warn", priority = 1 }
  34. error_impl_error = { level = "warn", priority = 1 }
  35. exit = { level = "warn", priority = 1 }
  36. filetype_is_file = { level = "warn", priority = 1 }
  37. float_arithmetic = { level = "warn", priority = 1 }
  38. float_cmp_const = { level = "warn", priority = 1 }
  39. fn_to_numeric_cast_any = { level = "warn", priority = 1 }
  40. host_endian_bytes = { level = "warn", priority = 1 }
  41. impl_trait_in_params = { level = "warn", priority = 1 }
  42. indexing_slicing = { level = "warn", priority = 1 }
  43. infinite_loop = { level = "warn", priority = 1 }
  44. integer_division = { level = "warn", priority = 1 }
  45. integer_division_remainder_used = { level = "warn", priority = 1 }
  46. lossy_float_literal = { level = "warn", priority = 1 }
  47. map_with_unused_argument_over_ranges = { level = "warn", priority = 1 }
  48. min_ident_chars = { level = "warn", priority = 1 }
  49. missing_assert_message = { level = "warn", priority = 1 }
  50. mixed_read_write_in_expression = { level = "warn", priority = 1 }
  51. multiple_unsafe_ops_per_block = { level = "warn", priority = 1 }
  52. mutex_atomic = { level = "warn", priority = 1 }
  53. mutex_integer = { level = "warn", priority = 1 }
  54. needless_raw_strings = { level = "warn", priority = 1 }
  55. non_zero_suggestions = { level = "warn", priority = 1 }
  56. panic = { level = "warn", priority = 1 }
  57. partial_pub_fields = { level = "warn", priority = 1 }
  58. pathbuf_init_then_push = { level = "warn", priority = 1 }
  59. pointer_format = { level = "warn", priority = 1 }
  60. precedence_bits = { level = "warn", priority = 1 }
  61. print_stderr = { level = "warn", priority = 1 }
  62. print_stdout = { level = "warn", priority = 1 }
  63. pub_without_shorthand = { level = "warn", priority = 1 }
  64. rc_buffer = { level = "warn", priority = 1 }
  65. rc_mutex = { level = "warn", priority = 1 }
  66. redundant_test_prefix = { level = "warn", priority = 1 }
  67. redundant_type_annotations = { level = "warn", priority = 1 }
  68. ref_patterns = { level = "warn", priority = 1 }
  69. renamed_function_params = { level = "warn", priority = 1 }
  70. rest_pat_in_fully_bound_structs = { level = "warn", priority = 1 }
  71. return_and_then = { level = "warn", priority = 1 }
  72. semicolon_inside_block = { level = "warn", priority = 1 }
  73. single_char_lifetime_names = { level = "warn", priority = 1 }
  74. std_instead_of_core = { level = "warn", priority = 1 }
  75. str_to_string = { level = "warn", priority = 1 }
  76. string_add = { level = "warn", priority = 1 }
  77. string_slice = { level = "warn", priority = 1 }
  78. suspicious_xor_used_as_pow = { level = "warn", priority = 1 }
  79. tests_outside_test_module = { level = "warn", priority = 1 }
  80. todo = { level = "warn", priority = 1 }
  81. try_err = { level = "warn", priority = 1 }
  82. undocumented_unsafe_blocks = { level = "warn", priority = 1 }
  83. unimplemented = { level = "warn", priority = 1 }
  84. unnecessary_safety_comment = { level = "warn", priority = 1 }
  85. unnecessary_safety_doc = { level = "warn", priority = 1 }
  86. unnecessary_self_imports = { level = "warn", priority = 1 }
  87. unneeded_field_pattern = { level = "warn", priority = 1 }
  88. unseparated_literal_suffix = { level = "warn", priority = 1 }
  89. unused_result_ok = { level = "warn", priority = 1 }
  90. unused_trait_names = { level = "warn", priority = 1 }
  91. unwrap_used = { level = "warn", priority = 1 }
  92. use_debug = { level = "warn", priority = 1 }
  93. verbose_file_reads = { level = "warn", priority = 1 }
  94. # Cargo
  95. cargo = "warn"
  96. cargo_common_metadata = { level = "allow", priority = 1 }
  97. [workspace.lints.rust]
  98. deprecated_safe = "warn"
  99. explicit_outlives_requirements = "warn"
  100. # Wait for https://github.com/rust-lang/rust/issues/130351
  101. # fuzzy_provenance_casts = "warn"
  102. impl_trait_overcaptures = "warn"
  103. # Wait for https://github.com/rust-lang/rust/issues/130351
  104. # lossy_provenance_casts = "warn"
  105. macro_use_extern_crate = "warn"
  106. meta_variable_misuse = "warn"
  107. missing_abi = "warn"
  108. missing_docs = "warn"
  109. missing_unsafe_on_extern = "warn"
  110. non_ascii_idents = "warn"
  111. # Wait for https://github.com/rust-lang/rust/issues/89554
  112. # non_exhaustive_omitted_patterns = "warn"
  113. non_local_definitions = "warn"
  114. redundant_lifetimes = "warn"
  115. single_use_lifetimes = "warn"
  116. unit_bindings = "warn"
  117. unnameable_types = "warn"
  118. unreachable_pub = "warn"
  119. unsafe_op_in_unsafe_fn = "warn"
  120. unstable_features = "warn"
  121. unused_crate_dependencies = "warn"
  122. unused_extern_crates = "warn"
  123. unused_macro_rules = "warn"
  124. unused_qualifications = "warn"
  125. unused_results = "warn"
  126. [workspace.lints.rustdoc]
  127. missing_crate_level_docs = "warn"
  128. private_doc_tests = "warn"
  129. unescaped_backticks = "warn"
  130. [patch.crates-io]
  131. blake2 = { path = "patches/blake2" }
  132. [profile.release]
  133. lto = true