File tree Expand file tree Collapse file tree 4 files changed +1779
-1655
lines changed Expand file tree Collapse file tree 4 files changed +1779
-1655
lines changed Original file line number Diff line number Diff line change 4
4
# Ensure that the submodule is updated and checked out in the intended revision
5
5
if ! which bindgen > /dev/null; then
6
6
echo " ERROR: ` bindgen` not found. Please install using cargo:"
7
- echo " cargo install bindgen"
7
+ echo " cargo install bindgen-cli --version=^0.69 "
8
8
exit 1
9
9
fi
10
10
11
11
repo_url=https://github.com/facebookresearch/faiss
12
- repo_rev=v1.7.2
12
+ repo_rev=v1.8.0
13
13
cuda_root=/opt/cuda
14
14
15
15
if [ ! -d faiss ]; then
16
16
git clone " $repo_url " faiss --branch " $repo_rev " --depth 1
17
17
fi
18
18
19
- bindgen_opt=' --size_t-is-usize --whitelist- function faiss_.* --whitelist -type idx_t|Faiss.* --opaque-type FILE'
19
+ bindgen_opt=' --allowlist- function faiss_.* --allowlist -type idx_t|Faiss.* --opaque-type FILE'
20
20
21
21
headers=` ls faiss/c_api/* _c.h faiss/c_api/impl/* _c.h faiss/c_api/utils/* _c.h`
22
22
echo ' // Auto-generated, do not edit!' > c_api.h
23
23
for header in $headers ; do
24
24
echo " #include \" " $header " \" " >> c_api.h;
25
25
done
26
26
27
- cmd=" bindgen --rust-target 1.33 $bindgen_opt c_api.h -o src/bindings.rs"
27
+ cmd=" bindgen --rust-target 1.59 $bindgen_opt c_api.h -o src/bindings.rs"
28
28
echo ${cmd}
29
29
${cmd}
30
30
@@ -33,7 +33,7 @@ for header in $headers; do
33
33
echo " #include \" " $header " \" " >> c_api.h;
34
34
done
35
35
36
- cmd=" bindgen --rust-target 1.33 $bindgen_opt c_api.h -o src/bindings_gpu.rs -- -Ifaiss/c_api -I$cuda_root /include"
36
+ cmd=" bindgen --rust-target 1.59 $bindgen_opt c_api.h -o src/bindings_gpu.rs -- -Ifaiss/c_api -I$cuda_root /include"
37
37
echo ${cmd}
38
38
${cmd}
39
39
You can’t perform that action at this time.
0 commit comments