Skip to content

Commit ed15d66

Browse files
author
Dylan Storey
committed
chore: prep v0.2.1-rc.1 release
- Update Rust publish workflow to use bundled binaries - Add include directive to Cargo.toml for libs/ directory - Add LICENSE file to Rust crate - Bump version to 0.2.1-rc.1
1 parent 23ef815 commit ed15d66

File tree

4 files changed

+71
-27
lines changed

4 files changed

+71
-27
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,33 @@ jobs:
1414
- os: ubuntu-latest
1515
artifact: graphqlite.so
1616
artifact-name: graphqlite-linux-x86_64.so
17+
rust-lib-name: graphqlite-linux-x86_64.so
1718
cli-artifact: gqlite
1819
cli-artifact-name: gqlite-linux-x86_64
1920
- os: ubuntu-24.04-arm
2021
artifact: graphqlite.so
2122
artifact-name: graphqlite-linux-aarch64.so
23+
rust-lib-name: graphqlite-linux-aarch64.so
2224
cli-artifact: gqlite
2325
cli-artifact-name: gqlite-linux-aarch64
2426
- os: macos-14
2527
arch: arm64
2628
artifact: graphqlite.dylib
2729
artifact-name: graphqlite-macos-arm64.dylib
30+
rust-lib-name: graphqlite-macos-aarch64.dylib
2831
cli-artifact: gqlite
2932
cli-artifact-name: gqlite-macos-arm64
3033
- os: macos-14
3134
arch: x86_64
3235
artifact: graphqlite.dylib
3336
artifact-name: graphqlite-macos-x86_64.dylib
37+
rust-lib-name: graphqlite-macos-x86_64.dylib
3438
cli-artifact: gqlite
3539
cli-artifact-name: gqlite-macos-x86_64
3640
- os: windows-latest
3741
artifact: graphqlite.dll
3842
artifact-name: graphqlite-windows-x86_64.dll
43+
rust-lib-name: graphqlite-windows-x86_64.dll
3944
cli-artifact: gqlite.exe
4045
cli-artifact-name: gqlite-windows-x86_64.exe
4146

@@ -147,6 +152,13 @@ jobs:
147152
if: matrix.arch != 'x86_64'
148153
uses: dtolnay/rust-toolchain@stable
149154

155+
- name: Copy extension to Rust libs
156+
if: matrix.arch != 'x86_64'
157+
shell: bash
158+
run: |
159+
mkdir -p bindings/rust/libs
160+
cp build/${{ matrix.artifact }} bindings/rust/libs/${{ matrix.rust-lib-name }}
161+
150162
- name: Test Rust bindings
151163
if: matrix.arch != 'x86_64'
152164
working-directory: bindings/rust
@@ -292,36 +304,46 @@ jobs:
292304
- name: Install Rust toolchain
293305
uses: dtolnay/rust-toolchain@stable
294306

295-
# Vendor C sources into the crate for crates.io publishing
296-
# The crate needs to be self-contained since crates.io doesn't have the full repo
297-
- name: Vendor C sources for crate
298-
run: |
299-
cd bindings/rust
300-
mkdir -p csrc/backend/parser csrc/backend/transform csrc/backend/executor
301-
mkdir -p csrc/include csrc/generated csrc/vendor/sqlite
302-
303-
# Copy include headers
304-
cp ../../src/include/*.h csrc/include/
305-
306-
# Copy parser sources
307-
cp ../../src/backend/parser/*.c csrc/backend/parser/
308-
cp ../../src/backend/parser/*.h csrc/backend/parser/
307+
# Download pre-built extension binaries for all platforms
308+
- name: Download Linux x86_64 extension
309+
uses: actions/download-artifact@v4
310+
with:
311+
name: graphqlite-linux-x86_64.so
312+
path: bindings/rust/libs/
309313

310-
# Copy transform sources
311-
cp ../../src/backend/transform/*.c csrc/backend/transform/
314+
- name: Download Linux ARM64 extension
315+
uses: actions/download-artifact@v4
316+
with:
317+
name: graphqlite-linux-aarch64.so
318+
path: bindings/rust/libs/
312319

313-
# Copy executor sources
314-
cp ../../src/backend/executor/*.c csrc/backend/executor/
320+
- name: Download macOS ARM64 extension
321+
uses: actions/download-artifact@v4
322+
with:
323+
name: graphqlite-macos-arm64.dylib
324+
path: bindings/rust/libs/
315325

316-
# Copy generated sources (pre-generated Flex/Bison output)
317-
cp ../../src/generated/*.c csrc/generated/
318-
cp ../../src/generated/*.h csrc/generated/
326+
- name: Download macOS x86_64 extension
327+
uses: actions/download-artifact@v4
328+
with:
329+
name: graphqlite-macos-x86_64.dylib
330+
path: bindings/rust/libs/
319331

320-
# Copy bundled init
321-
cp ../../src/bundled_init.c csrc/
332+
- name: Download Windows extension
333+
uses: actions/download-artifact@v4
334+
with:
335+
name: graphqlite-windows-x86_64.dll
336+
path: bindings/rust/libs/
322337

323-
# Copy vendored SQLite headers
324-
cp ../python/vendor/sqlite/*.h csrc/vendor/sqlite/
338+
- name: Rename extensions to expected names
339+
working-directory: bindings/rust/libs
340+
run: |
341+
mv graphqlite-linux-x86_64.so graphqlite-linux-x86_64.so || true
342+
mv graphqlite-linux-aarch64.so graphqlite-linux-aarch64.so || true
343+
mv graphqlite-macos-arm64.dylib graphqlite-macos-aarch64.dylib
344+
mv graphqlite-macos-x86_64.dylib graphqlite-macos-x86_64.dylib || true
345+
mv graphqlite-windows-x86_64.dll graphqlite-windows-x86_64.dll || true
346+
ls -la
325347
326348
- name: Publish to crates.io
327349
working-directory: bindings/rust

bindings/python/src/graphqlite/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from .utils import escape_string, sanitize_rel_type, CYPHER_RESERVED
99
from ._platform import get_loadable_path
1010

11-
__version__ = "0.2.0"
11+
__version__ = "0.2.1-rc.1"
1212
__all__ = [
1313
"Connection", "connect", "wrap", "load", "loadable_path",
1414
"Graph", "graph", "GraphManager", "graphs",

bindings/rust/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "graphqlite"
3-
version = "0.2.1"
3+
version = "0.2.1-rc.1"
44
edition = "2021"
55
description = "SQLite extension for graph queries using Cypher"
66
license = "MIT"
@@ -9,6 +9,7 @@ readme = "README.md"
99
keywords = ["sqlite", "graph", "cypher", "database"]
1010
categories = ["database"]
1111
exclude = ["tests/", "target/"]
12+
include = ["src/**/*", "libs/**/*", "Cargo.toml", "README.md", "LICENSE"]
1213

1314
[dependencies]
1415
rusqlite = { version = "0.31", features = ["bundled", "load_extension"] }

bindings/rust/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 GraphQLite Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)