Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
149 lines (123 loc) · 7.03 KB
/
Copy pathCargo.toml
File metadata and controls
149 lines (123 loc) · 7.03 KB
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
[workspace]
members = ['crates/surrealkit', 'crates/surrealkit-macros']
resolver = '2'
[workspace.package]
version = '1.0.0-beta.6'
edition = '2024'
rust-version = '1.95'
authors = ['Chiru Boggavarapu <chiru@foretag.co>', 'Tobie Morgan Hitchcock <tobie@surrealdb.com>']
repository = 'https://github.com/surrealdb/surrealkit'
homepage = 'https://github.com/surrealdb/surrealkit'
license = 'Apache-2.0'
[workspace.dependencies]
surrealkit-macros = { path = 'crates/surrealkit-macros', version = '1.0.0-beta.6' }
surrealdb = { version = '3.3.0', features = ['protocol-http', 'jwks'] }
surrealdb-types = { version = '3.3.0' }
anyhow = '1'
serde = { version = '1.0.225', features = ['derive'] }
serde_json = '1.0'
log = '0.4'
walkdir = '2.5'
[profile.release]
lto = true
strip = true
opt-level = 'z'
panic = 'abort'
codegen-units = 1
[workspace.lints.clippy]
# Checks for usage of `#[allow]` attribute and suggests replacing it with `#[expect]`.
# `#[expect]` attributes suppress the lint emission, but emit a warning if the expectation is unfulfilled.
# This is useful to be notified when the lint is no longer triggered.
# https://rust-lang.github.io/rust-clippy/master/#allow_attributes
allow_attributes = 'warn'
# Checks for code like `foo = bar.clone();`.
# Custom `Clone::clone_from()` or `ToOwned::clone_into` implementations allow the objects to share resources and
# therefore avoid allocations.
# https://rust-lang.github.io/rust-clippy/master/#assigning_clones
assigning_clones = 'warn'
# This lint allows boolean comparisons in assert-like macros.
# It is fine to use `assert_eq!(val, true)` in tests and is often more readable than `assert!(val)`.
# https://rust-lang.github.io/rust-clippy/master/#bool_assert_comparison
bool_assert_comparison = 'allow'
# Checks for the usage of `as _` conversion using inferred type.
# https://rust-lang.github.io/rust-clippy/master/#cloned_instead_of_copied
cloned_instead_of_copied = 'warn'
# Checks for function/method calls with a mutable parameter in `debug_assert!`, `debug_assert_eq!` and
# `debug_assert_ne!` macros.
# In release builds `debug_assert!` macros are optimized out by the compiler. Therefore mutating something in a
# `debug_assert!` macro results in different behavior between a release and debug build.
# https://rust-lang.github.io/rust-clippy/master/#debug_assert_with_mut_call
debug_assert_with_mut_call = 'warn'
# Denies the configured methods and functions in `clippy.toml`.
# Some methods are undesirable in certain contexts, and it’s beneficial to lint for them as needed.
# https://rust-lang.github.io/rust-clippy/master/#disallowed_methods
disallowed_methods = 'warn'
# Checks for explicit `.into_iter()` calls in for loops when the loop already implicitly calls it.
# Removing the explicit call makes the code more concise and idiomatic.
# https://rust-lang.github.io/rust-clippy/master/#explicit_into_iter_loop
explicit_into_iter_loop = 'warn'
# Checks for impls of `From<..>` that contain `panic!()` or `unwrap()`
# TryFrom should be used if there’s a possibility of failure.
# https://rust-lang.github.io/rust-clippy/master/#fallible_impl_from
fallible_impl_from = 'warn'
# Checks for usage of `.get().unwrap()` (or `.get_mut().unwrap()`) on a standard library type which implements Index.
# Using the Index trait ([]) is more clear and more concise.
# https://rust-lang.github.io/rust-clippy/master/#get_unwrap
get_unwrap = 'warn'
# Checks for the usage of `_.to_owned()`, `vec.to_vec()`, or similar when calling `_.clone()` would be clearer.
# https://rust-lang.github.io/rust-clippy/master/#implicit_clone
implicit_clone = 'warn'
# Checks for usage of `.to_string()` on an `&&T` where `T` implements `ToString` directly (like `&&str` or `&&String`).
# This bypasses the specialized implementation of ToString and instead goes through the more expensive string
# formatting facilities.
# https://rust-lang.github.io/rust-clippy/master/#inefficient_to_string
inefficient_to_string = 'warn'
# Checks for large types being passed by value instead of by reference.
# Passing large types by value causes unnecessary copies and memory overhead on the stack.
# https://rust-lang.github.io/rust-clippy/master/#large_types_passed_by_value
large_types_passed_by_value = 'warn'
# Checks for whole number float literals that cannot be represented as the underlying type without loss.
# If the value was intended to be exact, it will not be. This may be especially surprising when the lost precision
# is to the left of the decimal point.
# https://rust-lang.github.io/rust-clippy/master/#lossy_float_literal
lossy_float_literal = 'warn'
# Checks for binding to underscore prefixed variable without side-effects.
# https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding
no_effect_underscore_binding = 'warn'
# Checks for usage of `.as_ref().cloned()` and suggests `.cloned()` instead.
# Using `.cloned()` directly is more concise and easier to read.
# https://rust-lang.github.io/rust-clippy/master/#option_as_ref_cloned
option_as_ref_cloned = 'warn'
# Checks for unnecessary calls to `.clone()` on values that are already owned or about to be dropped.
# Redundant clones waste memory and CPU cycles without providing any benefit.
# https://rust-lang.github.io/rust-clippy/master/#redundant_clone
redundant_clone = 'warn'
# Checks for usage of `.contains()` followed by `.insert()` on `HashSet` or `BTreeSet`.
# Using a single `.insert()` call and checking its return value is more efficient as it avoids double lookup.
# https://rust-lang.github.io/rust-clippy/master/#set_contains_or_insert
set_contains_or_insert = 'warn'
# Checks for unnecessary calls to `to_owned()`, `to_string()` and other similar conversion methods
# that result in unnecessary allocations when a reference would suffice.
# https://rust-lang.github.io/rust-clippy/master/#unnecessary_to_owned
unnecessary_to_owned = 'warn'
# Checks for functions that are declared `async` but have no `.await`s inside of them.
# Async functions with no async code create overhead, both mentally and computationally.
# https://rust-lang.github.io/rust-clippy/master/#unused_async
#
# SurrealDB relies on async functions in the AST parser and executor to avoid stack overflows.
# Warning or denying this lint can cause unexpected errors.
unused_async = 'allow'
# Checks for `.unwrap()` or `.unwrap_err()` calls on Results and `.unwrap()` call on `Option`s.
# https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
unwrap_used = 'warn'
# Checks for the use of bindings with a single leading underscore.
# https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
used_underscore_binding = 'warn'
# Library code must not print directly: `surrealkit` is a library as well as a
# CLI, so unconditional writes to stdout/stderr are unsuppressible noise for
# consumers. Library modules emit through the `log` facade instead; the binary
# (src/main.rs and its `templates` module) allows these crate-wide, and installs a
# logger that reproduces the CLI's output exactly.
# https://rust-lang.github.io/rust-clippy/master/#print_stdout
print_stdout = 'deny'
print_stderr = 'deny'