Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

build: restore maturin backend to bundle the Rust bridge in the wheel

Yuneng Jiang5211c7301775
diff --git a/pyproject.toml b/pyproject.toml
index b5a62e550db..c2d8b3f7d54 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -234,8 +234,25 @@ healthcheck = [
]
[build-system]
-requires = ["uv_build==0.11.8"]
-build-backend = "uv_build"
+requires = ["maturin==1.9.4"]
+build-backend = "maturin"
+
+[tool.maturin]
+manifest-path = "litellm-rust/crates/python-bridge/Cargo.toml"
+module-name = "litellm.rust_bridge._native"
+python-source = "."
+bindings = "pyo3"
+include = ["litellm/proxy/_experimental/out/**"]
+exclude = [
+ "litellm/proxy/enterprise",
+ "litellm/proxy/enterprise/**",
+ "**/__pycache__",
+ "**/__pycache__/**",
+ "**/.pytest_cache",
+ "**/.pytest_cache/**",
+ "**/.ruff_cache",
+ "**/.ruff_cache/**",
+]
[tool.uv]
constraint-dependencies = [
@@ -258,18 +275,6 @@ litellm-enterprise = { workspace = true }
[tool.uv.workspace]
members = ["enterprise", "litellm-proxy-extras"]
-[tool.uv.build-backend]
-module-root = ""
-source-exclude = [
- "litellm/proxy/enterprise",
- "**/__pycache__",
- "**/__pycache__/**",
- "**/.pytest_cache",
- "**/.pytest_cache/**",
- "**/.ruff_cache",
- "**/.ruff_cache/**",
-]
-
[tool.isort]
profile = "black"