Skip to content

Commit aa338b0

Browse files
authored
refactor: make cocoindex crate a sub crate under the workspace (#1274)
* refactor: make `cocoindex` crate a sub crate under the workspace * workflow: change `Cargo.toml` location to update version * fix: put version and other package metadata at root `Cargo.toml`
1 parent fcf0a86 commit aa338b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+134
-18
lines changed

Cargo.toml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
1-
[package]
2-
name = "cocoindex"
3-
# Version used for local development is always higher than others to take precedence.
4-
# Will be overridden for specific release versions.
1+
[workspace]
2+
members = ["rust/cocoindex"]
3+
resolver = "2"
4+
5+
[workspace.package]
56
version = "999.0.0"
67
edition = "2024"
78
rust-version = "1.89"
89
license = "Apache-2.0"
910

10-
[profile.release]
11-
codegen-units = 1
12-
strip = "symbols"
13-
lto = true
14-
15-
[lib]
16-
name = "cocoindex_engine"
17-
crate-type = ["cdylib"]
18-
19-
[features]
20-
default = ["legacy-states-v0"]
21-
legacy-states-v0 = []
22-
23-
[dependencies]
11+
[workspace.dependencies]
2412
pyo3 = { version = "0.25.1", features = [
2513
"abi3-py311",
2614
"auto-initialize",
@@ -157,3 +145,8 @@ redis = { version = "0.31.0", features = ["tokio-comp", "connection-manager"] }
157145
expect-test = "1.5.0"
158146
encoding_rs = "0.8.35"
159147
tokio-util = { version = "0.7.16", features = ["rt"] }
148+
149+
[profile.release]
150+
codegen-units = 1
151+
strip = "symbols"
152+
lto = true

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ python-source = "python"
6060
module-name = "cocoindex._engine"
6161
features = ["pyo3/extension-module"]
6262
include = ["THIRD_PARTY_NOTICES.html"]
63+
# Point to the crate within the workspace
64+
manifest-path = "rust/cocoindex/Cargo.toml"
6365

6466
[project.optional-dependencies]
6567
dev = ["pytest", "pytest-asyncio", "ruff", "mypy", "pre-commit"]

rust/cocoindex/Cargo.toml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
[package]
2+
name = "cocoindex"
3+
version = { workspace = true }
4+
edition = { workspace = true }
5+
rust-version = { workspace = true }
6+
license = { workspace = true }
7+
8+
[lib]
9+
name = "cocoindex_engine"
10+
crate-type = ["cdylib"]
11+
12+
[features]
13+
default = ["legacy-states-v0"]
14+
legacy-states-v0 = []
15+
16+
[dependencies]
17+
pyo3 = { workspace = true }
18+
pythonize = { workspace = true }
19+
pyo3-async-runtimes = { workspace = true }
20+
21+
anyhow = { workspace = true }
22+
async-trait = { workspace = true }
23+
axum = { workspace = true }
24+
axum-extra = { workspace = true }
25+
base64 = { workspace = true }
26+
chrono = { workspace = true }
27+
config = { workspace = true }
28+
const_format = { workspace = true }
29+
futures = { workspace = true }
30+
log = { workspace = true }
31+
regex = { workspace = true }
32+
serde = { workspace = true }
33+
serde_json = { workspace = true }
34+
sqlx = { workspace = true }
35+
tokio = { workspace = true }
36+
tower = { workspace = true }
37+
tower-http = { workspace = true }
38+
indexmap = { workspace = true }
39+
blake2 = { workspace = true }
40+
pgvector = { workspace = true }
41+
phf = { workspace = true }
42+
indenter = { workspace = true }
43+
indicatif = { workspace = true }
44+
itertools = { workspace = true }
45+
derivative = { workspace = true }
46+
hex = { workspace = true }
47+
schemars = { workspace = true }
48+
env_logger = { workspace = true }
49+
reqwest = { workspace = true }
50+
async-openai = { workspace = true }
51+
52+
tree-sitter = { workspace = true }
53+
tree-sitter-language = { workspace = true }
54+
# Per language tree-sitter parsers
55+
tree-sitter-c = { workspace = true }
56+
tree-sitter-cpp = { workspace = true }
57+
tree-sitter-c-sharp = { workspace = true }
58+
tree-sitter-css = { workspace = true }
59+
tree-sitter-fortran = { workspace = true }
60+
tree-sitter-go = { workspace = true }
61+
tree-sitter-html = { workspace = true }
62+
tree-sitter-java = { workspace = true }
63+
tree-sitter-javascript = { workspace = true }
64+
tree-sitter-json = { workspace = true }
65+
# The other more popular crate tree-sitter-kotlin requires tree-sitter < 0.23 for now
66+
tree-sitter-kotlin-ng = { workspace = true }
67+
tree-sitter-md = { workspace = true }
68+
tree-sitter-pascal = { workspace = true }
69+
tree-sitter-php = { workspace = true }
70+
tree-sitter-python = { workspace = true }
71+
tree-sitter-r = { workspace = true }
72+
tree-sitter-ruby = { workspace = true }
73+
tree-sitter-rust = { workspace = true }
74+
tree-sitter-scala = { workspace = true }
75+
tree-sitter-sequel = { workspace = true }
76+
tree-sitter-swift = { workspace = true }
77+
tree-sitter-toml-ng = { workspace = true }
78+
tree-sitter-typescript = { workspace = true }
79+
tree-sitter-xml = { workspace = true }
80+
tree-sitter-yaml = { workspace = true }
81+
tree-sitter-solidity = { workspace = true }
82+
83+
globset = { workspace = true }
84+
unicase = { workspace = true }
85+
google-drive3 = { workspace = true }
86+
hyper-util = { workspace = true }
87+
hyper-rustls = { workspace = true }
88+
yup-oauth2 = { workspace = true }
89+
rustls = { workspace = true }
90+
http-body-util = { workspace = true }
91+
yaml-rust2 = { workspace = true }
92+
urlencoding = { workspace = true }
93+
qdrant-client = { workspace = true }
94+
uuid = { workspace = true }
95+
tokio-stream = { workspace = true }
96+
async-stream = { workspace = true }
97+
neo4rs = { workspace = true }
98+
bytes = { workspace = true }
99+
rand = { workspace = true }
100+
indoc = { workspace = true }
101+
owo-colors = { workspace = true }
102+
json5 = { workspace = true }
103+
aws-config = { workspace = true }
104+
aws-sdk-s3 = { workspace = true }
105+
aws-sdk-sqs = { workspace = true }
106+
time = { workspace = true }
107+
numpy = { workspace = true }
108+
infer = { workspace = true }
109+
serde_with = { workspace = true }
110+
google-cloud-aiplatform-v1 = { workspace = true }
111+
google-cloud-gax = { workspace = true }
112+
113+
azure_identity = { workspace = true }
114+
azure_core = { workspace = true }
115+
azure_storage = { workspace = true }
116+
azure_storage_blobs = { workspace = true }
117+
serde_path_to_error = { workspace = true }
118+
redis = { workspace = true }
119+
expect-test = { workspace = true }
120+
encoding_rs = { workspace = true }
121+
tokio-util = { workspace = true }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)