Cargo.toml 6.2 KB

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