diff --git a/litellm-rust/Cargo.toml b/litellm-rust/Cargo.toml index a13dd4c04b0..444343705c6 100644 --- a/litellm-rust/Cargo.toml +++ b/litellm-rust/Cargo.toml @@ -36,6 +36,14 @@ tokio-tungstenite = { version = "0.24", default-features = false, features = ["c futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] } base64 = "0.22" +[workspace.lints.rust] +unsafe_op_in_unsafe_fn = "warn" + +[workspace.lints.clippy] +await_holding_lock = "deny" +await_holding_refcell_ref = "deny" +undocumented_unsafe_blocks = "warn" + [profile.release] opt-level = 3 lto = "thin" diff --git a/litellm-rust/crates/ai-gateway/Cargo.toml b/litellm-rust/crates/ai-gateway/Cargo.toml index e3dbdf24ce6..30ea34d685f 100644 --- a/litellm-rust/crates/ai-gateway/Cargo.toml +++ b/litellm-rust/crates/ai-gateway/Cargo.toml @@ -43,3 +43,6 @@ python-config = ["dep:pyo3"] [dev-dependencies] futures-channel = "0.3" tower = { version = "0.5.3", features = ["util"] } + +[lints] +workspace = true diff --git a/litellm-rust/crates/core/Cargo.toml b/litellm-rust/crates/core/Cargo.toml index 389dbd49505..70225c771da 100644 --- a/litellm-rust/crates/core/Cargo.toml +++ b/litellm-rust/crates/core/Cargo.toml @@ -33,3 +33,6 @@ bedrock-auth = [ [dev-dependencies] tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } + +[lints] +workspace = true diff --git a/litellm-rust/crates/python-bridge/Cargo.toml b/litellm-rust/crates/python-bridge/Cargo.toml index 637e5580170..358d33b1977 100644 --- a/litellm-rust/crates/python-bridge/Cargo.toml +++ b/litellm-rust/crates/python-bridge/Cargo.toml @@ -35,3 +35,6 @@ tokio-tungstenite.workspace = true [[bench]] name = "serialization" harness = false + +[lints] +workspace = true diff --git a/litellm-rust/crates/python-interop/Cargo.toml b/litellm-rust/crates/python-interop/Cargo.toml index 9da6af6e2e2..75039072e1d 100644 --- a/litellm-rust/crates/python-interop/Cargo.toml +++ b/litellm-rust/crates/python-interop/Cargo.toml @@ -13,3 +13,6 @@ serde.workspace = true [dev-dependencies] rstest.workspace = true serde_json.workspace = true + +[lints] +workspace = true