Commit dfe612b
authored
Rust publishing updates (#789)
This PR adds automation for publishing the `cuvs` and `cuvs-sys` rust
crates.
I updated the rust usage
[README](https://github.com/rapidsai/cuvs/pull/789/files#diff-bcb0eb230db7a19167a81000c18bfb176049613f522d077479aa702384af7097)
to include simple steps to import the `cuvs` module in any consuming
rust project. I've added conda environment files that would facilitate
the installation steps described in the
[README](https://github.com/rapidsai/cuvs/pull/789/files#diff-bcb0eb230db7a19167a81000c18bfb176049613f522d077479aa702384af7097).
---
**Testing the changes in this PR included the following steps**:
- I first replicated local builds of the `cuvs` rust module.
- Then I attempted a build of the rust example in the `examples`
directory which imports the current `cuvs` library as is, and
successfully ran the rust example project.
- I updated the rust bindings to use different package names and
published both as:
- [jawe-cuvs-iii](https://crates.io/crates/jawe-cuvs-iii) (cuvs)
- [jave-cuvs-sys-iii](https://crates.io/crates/jawe-cuvs-sys-iii)
(cuvs-sys)
- I published by running the `publish-rust.yaml` workflow. First run can
be found
[here](https://github.com/rapidsai/cuvs/actions/runs/14158410647/job/39660631194),
and a second run
[here](https://github.com/rapidsai/cuvs/actions/runs/14205715742/job/39802866340).
- After publishing, I locally compiled the example rust module by
importing the published modules (`jawe-cuvs-iii` & `jawe-cuvs-sys-iii`)
and was able to successfully run the example rust project
- I also tested the build & imports on both ARM and AMD architectures.
<details>
<summary>Cargo run output </summary>
```
# cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
Running `target/debug/cuvs-rust-example`
using ivf_pq::index_params nrows 65536, dim 512, n_lists 256, pq_dim 128
[ 18669][17:16:49:911962][info ] optimizing graph
[ 18669][17:16:50:057608][info ] Graph optimized, creating index
Indexed 65536x512 datapoints into cagra index
Neighbors [[0, 6880, 12927, 59705, 45003, 33779, 39003, 56796, 6491, 34338],
[1, 28206, 47512, 44788, 14031, 49376, 43330, 3429, 41428, 49044],
[2, 45154, 4777, 62753, 45378, 13104, 4082, 46221, 65234, 45638],
[3, 41243, 59296, 4950, 55157, 32839, 42927, 10811, 37504, 57827]], shape=[4, 10], strides=[10, 1], layout=Cc (0x5), const ndim=2
Distances [[0.0, 68.72183, 69.83197, 70.23868, 71.08637, 71.15034, 71.60148, 71.71672, 71.82242, 71.90005],
[0.0, 68.85643, 69.43584, 69.72554, 69.883835, 70.03081, 70.05081, 70.1477, 70.169556, 70.26346],
[0.0, 69.09878, 69.42933, 70.06172, 70.10106, 70.16475, 70.19414, 70.64023, 70.64905, 70.71358],
[0.0, 64.99479, 65.39395, 66.827286, 66.99862, 67.110855, 67.57162, 67.779526, 67.964035, 68.002716]], shape=[4, 10], strides=[10, 1], layout=Cc (0x5), const ndim=2
```
</details>1 parent 51ac562 commit dfe612b
File tree
6 files changed
+159
-1
lines changed- .github/workflows
- conda/environments
- examples/rust
6 files changed
+159
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 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 | + | |
0 commit comments