-
Notifications
You must be signed in to change notification settings - Fork 26
/
Cargo.toml
193 lines (187 loc) · 12.8 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[workspace]
members = [
"services/api",
"services/cli",
"lib/*",
"plus/*",
"tasks/*",
"xtask",
]
exclude = ["services/benchers", "services/cargo-bencher"]
resolver = "2"
[workspace.package]
version = "0.4.30"
authors = ["Everett Pompeii <[email protected]>"]
edition = "2021"
[workspace.dependencies]
# services
bencher_api = { path = "services/api" }
bencher_cli = { path = "services/cli" }
# lib
bencher_adapter = { path = "lib/bencher_adapter" }
bencher_boundary = { path = "lib/bencher_boundary" }
bencher_client = { path = "lib/bencher_client" }
bencher_comment = { path = "lib/bencher_comment" }
bencher_github = { path = "lib/bencher_github" }
bencher_json = { path = "lib/bencher_json" }
bencher_logger = { path = "lib/bencher_logger" }
bencher_plot = { path = "lib/bencher_plot" }
bencher_rank = { path = "lib/bencher_rank" }
bencher_rbac = { path = "lib/bencher_rbac" }
bencher_token = { path = "lib/bencher_token" }
bencher_valid = { path = "lib/bencher_valid" }
# plus
bencher_billing = { path = "plus/bencher_billing" }
bencher_bing_index = { path = "plus/bencher_bing_index" }
bencher_google_index = { path = "plus/bencher_google_index" }
bencher_license = { path = "plus/bencher_license" }
# crates.io
anyhow = "1.0"
async-trait = "0.1"
camino = "1.1"
chrono = { version = "0.4", default-features = false }
clap = { version = "4.5", features = ["derive"] }
derive_more = { version = "1.0", features = ["display"] }
diesel = "2.2"
http = "1.1"
jsonwebtoken = "9.3"
literally = "0.1"
octocrab = "0.41"
ordered-float = "4.4"
oso = "0.27"
pretty_assertions = "1.4"
rand = "0.8"
reqwest = { version = "0.12", default-features = false }
schemars = { version = "0.8", features = ["uuid1"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_urlencoded = "0.7"
serde_yaml = "0.9"
slog = "2.7"
slug = "0.1"
tabled = "0.16"
thiserror = "1.0"
tokio = "1.40"
typeshare = "1.0"
url = "2.5"
uuid = "1.11"
# oxide
dropshot = "0.12"
progenitor = "0.8"
progenitor-client = "0.8"
[workspace.lints.rust]
# https://doc.rust-lang.org/rustc/lints/listing/index.html
dead_code = "warn"
explicit_outlives_requirements = "warn"
invalid_reference_casting = "warn"
let_underscore_drop = "warn"
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
non_ascii_idents = "warn"
noop_method_call = "warn"
single_use_lifetimes = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unsafe_code = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
variant_size_differences = "warn"
[workspace.lints.clippy]
# https://github.com/rust-lang/rust-clippy
all = { level = "warn", priority = -1 }
# cargo
cargo = { level = "warn", priority = -1 }
cargo_common_metadata = "allow" # Checks to see if all common metadata is defined in Cargo.toml.
multiple_crate_versions = "allow" # Checks to see if multiple versions of a crate are being used.
# pedantic
pedantic = { level = "warn", priority = -1 }
missing_errors_doc = "allow" # Checks the doc comments of publicly visible functions that return a Result type and warns if there is no # Errors section.
missing_panics_doc = "allow" # Checks the doc comments of publicly visible functions that may panic and warns if there is no # Panics section.
module_name_repetitions = "allow" # Detects type names that are prefixed or suffixed by the containing module’s name.
must_use_candidate = "allow" # Checks for public functions that have no #[must_use] attribute, but return something not already marked must-use, have no mutable arg and mutate no statics.
# restriction
absolute_paths = "warn" # Checks for usage of items through absolute paths, like std::env::current_dir.
as_underscore = "warn" # Checks for the usage of as _ conversion using inferred type.
big_endian_bytes = "warn" # Checks for the usage of the to_be_bytes method and/or the function from_be_bytes.
cfg_not_test = "warn" # Checks for usage of cfg that excludes code from test builds. (i.e., #[cfg(not(test))])
dbg_macro = "warn" # Checks for usage of the dbg! macro.
decimal_literal_representation = "warn" # Warns if there is a better representation for a numeric literal.
error_impl_error = "warn" # Checks for types named Error that implement Error.
empty_enum_variants_with_brackets = "warn" # Finds enum variants without fields that are declared with empty brackets.
exit = "warn" # Detects calls to the exit() function which terminates the program.
expect_used = "warn" # Checks for .expect() or .expect_err() calls on Results and .expect() call on Options.
field_scoped_visibility_modifiers = "warn" # Checks for usage of scoped visibility modifiers, like pub(crate), on fields. These make a field visible within a scope between public and private.
filetype_is_file = "warn" # Checks for FileType::is_file().
float_cmp_const = "warn" # Checks for (in-)equality comparisons on floating-point value and constant, except in functions called *eq* (which probably implement equality for a type involving floats).
fn_to_numeric_cast_any = "warn" # Checks for casts of a function pointer to any integer type.
get_unwrap = "warn" # Checks for usage of .get().unwrap() (or .get_mut().unwrap) on a standard library type which implements Index
host_endian_bytes = "warn" # Checks for the usage of the to_ne_bytes method and/or the function from_ne_bytes.
if_then_some_else_none = "warn" # Checks for if-else that could be written using either bool::then or bool::then_some.
impl_trait_in_params = "warn" # Lints when impl Trait is being used in a function’s parameters.
indexing_slicing = "warn" # Checks for usage of indexing or slicing. Arrays are special cases, this lint does report on arrays if we can tell that slicing operations are in bounds and does not lint on constant usize indexing on arrays because that is handled by rustc’s const_err lint.
infinite_loop = "warn" # Checks for infinite loops in a function where the return type is not ! and lint accordingly.
inline_asm_x86_att_syntax = "warn" # Checks for usage of AT&T x86 assembly syntax.
inline_asm_x86_intel_syntax = "warn" # Checks for usage of Intel x86 assembly syntax.
integer_division = "warn" # Checks for division of integers
into_iter_without_iter = "warn" # This is the opposite of the iter_without_into_iter lint. It looks for IntoIterator for (&|&mut) Type implementations without an inherent iter or iter_mut method on the type or on any of the types in its Deref chain.
iter_without_into_iter = "warn" # Looks for iter and iter_mut methods without an associated IntoIterator for (&|&mut) Type implementation.
large_include_file = "warn" # Checks for the inclusion of large files via include_bytes!() and include_str!()
little_endian_bytes = "warn" # Checks for the usage of the to_le_bytes method and/or the function from_le_bytes.
lossy_float_literal = "warn" # Checks for whole number float literals that cannot be represented as the underlying type without loss.
map_err_ignore = "warn" # Checks for instances of map_err(|_| Some::Enum)
mem_forget = "warn" # Checks for usage of std::mem::forget(t) where t is Drop or has a field that implements Drop.
missing_assert_message = "warn" # Checks assertions without a custom panic message.
missing_asserts_for_indexing = "warn" # Checks for repeated slice indexing without asserting beforehand that the length is greater than the largest index used to index into the slice.
mixed_read_write_in_expression = "warn" # Checks for a read and a write to the same variable where whether the read occurs before or after the write depends on the evaluation order of sub-expressions.
modulo_arithmetic = "warn" # Checks for modulo arithmetic.
multiple_inherent_impl = "warn" # Checks for multiple inherent implementations of a struct
mutex_atomic = "warn" # Checks for usage of Mutex<X> where an atomic will do.
needless_raw_strings = "warn" # Checks for raw string literals where a string literal can be used instead.
panic = "warn" # Checks for usage of panic!.
partial_pub_fields = "warn" # Checks whether partial fields of a struct are public.
pathbuf_init_then_push = "warn" # Checks for calls to push immediately after creating a new PathBuf.
print_stdout = "warn" # Checks for printing on stdout. The purpose of this lint is to catch debugging remnants.
print_stderr = "warn" # Checks for printing on stderr. The purpose of this lint is to catch debugging remnants.
rc_buffer = "warn" # Checks for Rc<T> and Arc<T> when T is a mutable buffer type such as String or Vec.
rc_mutex = "warn" # Checks for Rc<Mutex<T>>.
redundant_type_annotations = "warn" # Warns about needless / redundant type annotations.
ref_patterns = "warn" # Checks for usages of the ref keyword.
renamed_function_params = "warn" # Lints when the name of function parameters from trait impl is different than its default implementation.
rest_pat_in_fully_bound_structs = "warn" # Checks for unnecessary ‘…’ pattern binding on struct when all fields are explicitly matched.
same_name_method = "warn" # It lints if a struct has two methods with the same name: one from a trait, another not from trait.
semicolon_inside_block = "warn" # Suggests moving the semicolon after a block to the inside of the block, after its last expression.
separated_literal_suffix = "warn" # Warns if literal suffixes are separated by an underscore. To enforce separated literal suffix style, see the unseparated_literal_suffix lint.
should_panic_without_expect = "warn" # Checks for #[should_panic] attributes without specifying the expected panic message.
str_to_string = "warn" # This lint checks for .to_string() method calls on values of type &str.
string_add = "warn" # Checks for all instances of x + _ where x is of type String, but only if string_add_assign does not match.
string_lit_chars_any = "warn" # Checks for <string_lit>.chars().any(|i| i == c).
string_slice = "warn" # Checks for slice operations on strings
string_to_string = "warn" # This lint checks for .to_string() method calls on values of type String.
struct_field_names = "warn" # Detects struct fields that are prefixed or suffixed by the same characters or the name of the struct itself.
suspicious_xor_used_as_pow = "warn" # Warns for a Bitwise XOR (^) operator being probably confused as a powering. It will not trigger if any of the numbers are not in decimal.
todo = "warn" # Checks for usage of todo!.
try_err = "warn" # Checks for usage of Err(x)?.
undocumented_unsafe_blocks = "warn" # Checks for unsafe blocks and impls without a // SAFETY: comment explaining why the unsafe operations performed inside the block are safe.
unimplemented = "warn" # Checks for usage of unimplemented!.
unnecessary_safety_comment = "warn" # Checks for // SAFETY: comments on safe code.
unnecessary_safety_doc = "warn" # Checks for the doc comments of publicly visible safe functions and traits and warns if there is a # Safety section.
unnecessary_self_imports = "warn" # Checks for imports ending in ::{self}.
unreachable = "warn" # Checks for usage of unreachable!.
unused_result_ok = "warn" # Checks for calls to Result::ok() without using the returned Option.
unwrap_used = "warn" # Checks for .unwrap() or .unwrap_err() calls on Results and .unwrap() call on Options.
use_debug = "warn" # Checks for usage of Debug formatting. The purpose of this lint is to catch debugging remnants.
verbose_file_reads = "warn" # Checks for usage of File::read_to_end and File::read_to_string.
wildcard_enum_match_arm = "warn" # Checks for wildcard enum matches using _.
# TODO use this to generate wasm builds
# https://github.com/bencherdev/bencher/issues/48
[profile.release-small]
inherits = "release"
opt-level = "s"
# https://benw.is/posts/how-i-improved-my-rust-compile-times-by-seventy-five-percent#optimization-level
# [profile.dev]
# opt-level = 1
# [profile.dev.package."*"]
# opt-level = 3