Skip to content

Commit 4e93282

Browse files
committed
ffi-test
Signed-off-by: Mikhail Kot <mikhail@spiraldb.com>
1 parent f8b18d9 commit 4e93282

20 files changed

Lines changed: 224 additions & 305 deletions

.github/workflows/rust-instrumented.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
- sanitizer: tsan
195195
sanitizer_flags: "-Zsanitizer=thread"
196196
name: "Rust/C++ FFI tests (${{ matrix.sanitizer }})"
197-
timeout-minutes: 30
197+
timeout-minutes: 5
198198
env:
199199
ASAN_OPTIONS: "symbolize=1:check_initialization_order=1:detect_leaks=1:leak_check_at_exit=1"
200200
LSAN_OPTIONS: "report_objects=1"
@@ -217,9 +217,6 @@ jobs:
217217
sccache: s3
218218
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
219219
- uses: ./.github/actions/setup-prebuild
220-
- name: Install rustfilt
221-
run: |
222-
cargo install rustfilt
223220
- name: Install Rust nightly toolchain
224221
run: |
225222
rustup toolchain install $NIGHTLY_TOOLCHAIN
@@ -241,8 +238,7 @@ jobs:
241238
- name: Run tests
242239
run: |
243240
set -o pipefail
244-
# re-enable once we can fix this hang
245-
# ./vortex-ffi/build/test/vortex_ffi_test 2>&1 | rustfilt
241+
./vortex-ffi/build/test/vortex_ffi_test
246242
- name: Run examples
247243
run: |
248244
set -o pipefail
@@ -251,11 +247,11 @@ jobs:
251247
# error: Unable to walk dir: File system loop found
252248
rm -fr vortex-ffi/build/_deps/nanoarrow-src/python
253249
254-
./vortex-ffi/build/examples/write_sample file.vortex 2>&1 | rustfilt
255-
./vortex-ffi/build/examples/write_sample file2.vortex 2>&1 | rustfilt
256-
./vortex-ffi/build/examples/dtype '*.vortex' 2>&1 | rustfilt
257-
./vortex-ffi/build/examples/scan '*.vortex' 2>&1 | rustfilt
258-
./vortex-ffi/build/examples/scan_to_arrow '*.vortex' 2>&1 | rustfilt
250+
./vortex-ffi/build/examples/write_sample file.vortex
251+
./vortex-ffi/build/examples/write_sample file2.vortex
252+
./vortex-ffi/build/examples/dtype '*.vortex'
253+
./vortex-ffi/build/examples/scan '*.vortex'
254+
./vortex-ffi/build/examples/scan_to_arrow '*.vortex'
259255
260256
miri:
261257
name: "Rust tests (miri)"

vortex-ffi/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Vortex C interface
1+
# Vortex C bindings
22

33
## Updating Headers
44

@@ -20,7 +20,7 @@ target_link_libraries(my_target, vortex_ffi_shared)
2020
# or target_link_libraries(my_target, vortex_ffi)
2121
```
2222

23-
## Running C examples:
23+
## Running C examples
2424

2525
```sh
2626
cmake -Bbuild -DBUILD_EXAMPLES=1
@@ -99,7 +99,7 @@ cargo +nightly build -Zbuild-std --target=<target triple> \
9999
2. Build tests with target triple:
100100

101101
```sh
102-
cmake -Bbuild -DWITH_ASAN=1 -DTARGET_TRIPLE=<target triple>
102+
cmake -Bbuild -DSANITIZER=asan -DTARGET_TRIPLE=<target triple>
103103
```
104104

105105
3. Run the tests (ctest doesn't output failures in detail):

vortex-ffi/cbindgen.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ header = """
1111
#pragma once
1212
#include <stdint.h>
1313
14-
//
1514
// THIS FILE IS AUTO-GENERATED, DO NOT MAKE EDITS DIRECTLY
16-
//
15+
16+
// All operations return owned types which need to be freed by calling a
17+
// matching _free() function. This includes all arrays, data sources, scans,
18+
// errors, error messages, and other allocated objects.
1719
1820
// https://arrow.apache.org/docs/format/CDataInterface.html#structure-definitions
1921
// If you want to use your own Arrow library like nanoarrow, define this macro

0 commit comments

Comments
 (0)