fixup rust bindings

This commit is contained in:
Alex Garcia 2024-05-10 21:13:18 -07:00
parent a6495e1e9a
commit 38e41c62eb
5 changed files with 36 additions and 14 deletions

View file

@ -133,8 +133,8 @@ jobs:
with:
toolchain: stable
- run: make sqlite-vec.h
- run: cp sqlite-vec.c bindings/rust
- run: cp sqlite-vec.h bindings/rust
- run: make deps
working-directory: ./bindings/rust
- run: cargo publish --no-verify
working-directory: ./bindings/rust
env:

View file

@ -1,3 +1,4 @@
target/
sqlite-vec.c
sqlite-vec.h
Cargo.toml

View file

@ -1,12 +0,0 @@
[package]
name = "sqlite-vec"
version = "0.1.0"
edition = "2021"
[dependencies]
[build-dependencies]
cc = "1.0"
[dev-dependencies]
rusqlite = "0.31.0"

View file

@ -0,0 +1,19 @@
[package]
name = "sqlite-vec"
version = "${VERSION}"
edition = "2021"
authors = ["Alex Garcia <alexsebastian.garcia@gmail.com>"]
description = "FFI bindings to the sqlite-vec SQLite extension"
homepage = "https://github.com/asg017/sqlite-vec"
repository = "https://github.com/asg017/sqlite-vec"
keywords = ["sqlite", "sqlite-extension"]
license = "MIT/Apache-2.0"
[dependencies]
[build-dependencies]
cc = "1.0"
[dev-dependencies]
rusqlite = "0.31.0"

14
bindings/rust/Makefile Normal file
View file

@ -0,0 +1,14 @@
VERSION=$(shell cat ../../VERSION)
deps: Cargo.toml sqlite-vec.c sqlite-vec.h
Cargo.toml: ../../VERSION Cargo.toml.tmpl
VERSION=$(VERSION) envsubst < Cargo.toml.tmpl > $@
sqlite-vec.c: ../../sqlite-vec.c
cp $< $@
sqlite-vec.h: ../../sqlite-vec.h
cp $< $@
.PHONY: deps