Cargo.toml 5.8 KB

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