├── .github
├── dependabot.yml
└── workflows
│ └── ci.yml
├── .gitignore
├── .gitmodules
├── CMakeLists.txt
├── Cargo.lock
├── Cargo.toml
├── Makefile
├── README.md
├── bors.toml
├── examples
├── README.md
├── jolt.yaml
└── short.yaml
├── src
├── bind.rs
├── consume.rs
├── lib.rs
├── partition.rs
├── topic.rs
├── wrapper.c
└── wrapper.h
└── toolchain.toml
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | labels:
6 | - bot
7 | - github_actions
8 | - dependencies
9 |
10 | schedule:
11 | # Check for updates to GitHub Actions every weekday
12 | interval: "daily"
13 | commit-message:
14 | prefix: ci
15 | include: scope
16 | ignore:
17 | - dependency-name: "*"
18 | update-types: [
19 | "version-update:semver-minor",
20 | "version-update:semver-patch",
21 | ] # Only major version updates
22 |
23 | # Maintain dependencies for Cargo
24 | - package-ecosystem: "cargo"
25 | directory: "/"
26 | schedule:
27 | interval: "daily"
28 | labels:
29 | - bot
30 | - rust
31 | - dependencies
32 | commit-message:
33 | prefix: build
34 | include: scope
35 | ignore:
36 | - dependency-name: "*"
37 | update-types: [
38 | "version-update:semver-minor",
39 | "version-update:semver-patch",
40 | ] # Only major version updates
41 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches:
6 | - staging
7 | - trying
8 | pull_request:
9 | branches: [main]
10 |
11 | concurrency:
12 | group: ci-${{ github.ref }}
13 | cancel-in-progress: true
14 |
15 | jobs:
16 |
17 | build:
18 | name: Build ${{ matrix.check }} on (${{ matrix.os }})
19 | if: false
20 | runs-on: ${{ matrix.os }}
21 | strategy:
22 | matrix:
23 | os: [ubuntu-latest, macos-latest]
24 | steps:
25 | - uses: actions/checkout@v3
26 | with:
27 | submodules: true
28 | - name: Install Rust
29 | uses: actions-rs/toolchain@v1
30 | with:
31 | toolchain: stable
32 | profile: minimal
33 | - uses: Swatinem/rust-cache@v2
34 | with:
35 | key: ${{ matrix.os }}-build
36 | - name: Build
37 | run: make debug
38 |
39 | check:
40 | name: Check ${{ matrix.check }} on (${{ matrix.os }})
41 | runs-on: ${{ matrix.os }}
42 | strategy:
43 | matrix:
44 | os: [ubuntu-latest, macos-latest]
45 | rust: [stable]
46 | check: [test]
47 | include:
48 | - os: ubuntu-latest
49 | rust: stable
50 | check: fmt
51 | - os: ubuntu-latest
52 | rust: stable
53 | check: clippy
54 | - os: ubuntu-latest
55 | rust: stable
56 | check: audit
57 |
58 | steps:
59 | - uses: actions/checkout@v3
60 | - name: Install ${{ matrix.rust }}
61 | uses: actions-rs/toolchain@v1
62 | with:
63 | toolchain: ${{ matrix.rust }}
64 | profile: minimal
65 | - uses: Swatinem/rust-cache@v2
66 | with:
67 | key: ${{ matrix.os }}-${{ matrix.check }}
68 | - name: Clippy
69 | if: ${{ matrix.check == 'clippy' }}
70 | run: make check-clippy
71 | - name: Fmt
72 | if: ${{ matrix.check == 'fmt' }}
73 | run: make check-fmt
74 |
75 | done:
76 | name: Done
77 | needs:
78 | - check
79 | runs-on: ubuntu-latest
80 | steps:
81 | - name: Done
82 | run: echo "Done!"
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | **/*.rs.bk
3 | .DS_Store
4 | .idea/
5 | .vscode/
6 | vendor/
7 | CMakeCache.txt
8 | CMakeFiles
9 | build
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "duckdb"]
2 | path = duckdb
3 | url = https://github.com/duckdb/duckdb
4 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.22)
2 | cmake_policy(VERSION 3.22)
3 | set(TARGET_NAME fluvioduck) # rust lib name
4 | project(${TARGET_NAME} VERSION 0.0.1)
5 |
6 |
7 | include(FetchContent)
8 |
9 | FetchContent_Declare(
10 | Corrosion
11 | GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
12 | GIT_TAG v0.2.1 # Optionally specify a commit hash, version tag or branch here
13 | )
14 | FetchContent_MakeAvailable(Corrosion)
15 |
16 | corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Cargo.toml)
17 |
18 | set(ALL_SOURCES src/wrapper.h src/wrapper.c)
19 | build_loadable_extension(${TARGET_NAME} ${ALL_SOURCES})
20 |
21 | set(LIB_NAME ${TARGET_NAME}_loadable_extension)
22 |
23 | set_target_properties(${LIB_NAME} PROPERTIES LINKER_LANGUAGE CXX)
24 | target_link_libraries(${LIB_NAME}
25 | "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET_NAME}.a")
26 |
27 | target_link_libraries(${LIB_NAME}
28 | "${CMAKE_BINARY_DIR}/src/libduckdb_static.a")
29 |
--------------------------------------------------------------------------------
/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "adler"
7 | version = "1.0.2"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
10 |
11 | [[package]]
12 | name = "ahash"
13 | version = "0.8.3"
14 | source = "registry+https://github.com/rust-lang/crates.io-index"
15 | checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
16 | dependencies = [
17 | "cfg-if",
18 | "const-random",
19 | "getrandom",
20 | "once_cell",
21 | "version_check",
22 | ]
23 |
24 | [[package]]
25 | name = "alloc-no-stdlib"
26 | version = "2.0.4"
27 | source = "registry+https://github.com/rust-lang/crates.io-index"
28 | checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
29 |
30 | [[package]]
31 | name = "alloc-stdlib"
32 | version = "0.2.2"
33 | source = "registry+https://github.com/rust-lang/crates.io-index"
34 | checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
35 | dependencies = [
36 | "alloc-no-stdlib",
37 | ]
38 |
39 | [[package]]
40 | name = "android_system_properties"
41 | version = "0.1.5"
42 | source = "registry+https://github.com/rust-lang/crates.io-index"
43 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
44 | dependencies = [
45 | "libc",
46 | ]
47 |
48 | [[package]]
49 | name = "anyhow"
50 | version = "1.0.69"
51 | source = "registry+https://github.com/rust-lang/crates.io-index"
52 | checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
53 |
54 | [[package]]
55 | name = "arrow-array"
56 | version = "34.0.0"
57 | source = "registry+https://github.com/rust-lang/crates.io-index"
58 | checksum = "d35d5475e65c57cffba06d0022e3006b677515f99b54af33a7cd54f6cdd4a5b5"
59 | dependencies = [
60 | "ahash",
61 | "arrow-buffer",
62 | "arrow-data",
63 | "arrow-schema",
64 | "chrono",
65 | "half",
66 | "hashbrown 0.13.2",
67 | "num",
68 | ]
69 |
70 | [[package]]
71 | name = "arrow-buffer"
72 | version = "34.0.0"
73 | source = "registry+https://github.com/rust-lang/crates.io-index"
74 | checksum = "68b4ec72eda7c0207727df96cf200f539749d736b21f3e782ece113e18c1a0a7"
75 | dependencies = [
76 | "half",
77 | "num",
78 | ]
79 |
80 | [[package]]
81 | name = "arrow-cast"
82 | version = "34.0.0"
83 | source = "registry+https://github.com/rust-lang/crates.io-index"
84 | checksum = "0a7285272c9897321dfdba59de29f5b05aeafd3cdedf104a941256d155f6d304"
85 | dependencies = [
86 | "arrow-array",
87 | "arrow-buffer",
88 | "arrow-data",
89 | "arrow-schema",
90 | "arrow-select",
91 | "chrono",
92 | "lexical-core",
93 | "num",
94 | ]
95 |
96 | [[package]]
97 | name = "arrow-data"
98 | version = "34.0.0"
99 | source = "registry+https://github.com/rust-lang/crates.io-index"
100 | checksum = "27cc673ee6989ea6e4b4e8c7d461f7e06026a096c8f0b1a7288885ff71ae1e56"
101 | dependencies = [
102 | "arrow-buffer",
103 | "arrow-schema",
104 | "half",
105 | "num",
106 | ]
107 |
108 | [[package]]
109 | name = "arrow-ipc"
110 | version = "34.0.0"
111 | source = "registry+https://github.com/rust-lang/crates.io-index"
112 | checksum = "e37b8b69d9e59116b6b538e8514e0ec63a30f08b617ce800d31cb44e3ef64c1a"
113 | dependencies = [
114 | "arrow-array",
115 | "arrow-buffer",
116 | "arrow-cast",
117 | "arrow-data",
118 | "arrow-schema",
119 | "flatbuffers",
120 | ]
121 |
122 | [[package]]
123 | name = "arrow-schema"
124 | version = "34.0.0"
125 | source = "registry+https://github.com/rust-lang/crates.io-index"
126 | checksum = "64951898473bfb8e22293e83a44f02874d2257514d49cd95f9aa4afcff183fbc"
127 |
128 | [[package]]
129 | name = "arrow-select"
130 | version = "34.0.0"
131 | source = "registry+https://github.com/rust-lang/crates.io-index"
132 | checksum = "2a513d89c2e1ac22b28380900036cf1f3992c6443efc5e079de631dcf83c6888"
133 | dependencies = [
134 | "arrow-array",
135 | "arrow-buffer",
136 | "arrow-data",
137 | "arrow-schema",
138 | "num",
139 | ]
140 |
141 | [[package]]
142 | name = "async-attributes"
143 | version = "1.1.2"
144 | source = "registry+https://github.com/rust-lang/crates.io-index"
145 | checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5"
146 | dependencies = [
147 | "quote",
148 | "syn",
149 | ]
150 |
151 | [[package]]
152 | name = "async-channel"
153 | version = "1.8.0"
154 | source = "registry+https://github.com/rust-lang/crates.io-index"
155 | checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833"
156 | dependencies = [
157 | "concurrent-queue",
158 | "event-listener",
159 | "futures-core",
160 | ]
161 |
162 | [[package]]
163 | name = "async-executor"
164 | version = "1.5.0"
165 | source = "registry+https://github.com/rust-lang/crates.io-index"
166 | checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b"
167 | dependencies = [
168 | "async-lock",
169 | "async-task",
170 | "concurrent-queue",
171 | "fastrand",
172 | "futures-lite",
173 | "slab",
174 | ]
175 |
176 | [[package]]
177 | name = "async-global-executor"
178 | version = "2.3.1"
179 | source = "registry+https://github.com/rust-lang/crates.io-index"
180 | checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776"
181 | dependencies = [
182 | "async-channel",
183 | "async-executor",
184 | "async-io",
185 | "async-lock",
186 | "blocking",
187 | "futures-lite",
188 | "once_cell",
189 | ]
190 |
191 | [[package]]
192 | name = "async-io"
193 | version = "1.12.0"
194 | source = "registry+https://github.com/rust-lang/crates.io-index"
195 | checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794"
196 | dependencies = [
197 | "async-lock",
198 | "autocfg",
199 | "concurrent-queue",
200 | "futures-lite",
201 | "libc",
202 | "log",
203 | "parking",
204 | "polling",
205 | "slab",
206 | "socket2",
207 | "waker-fn",
208 | "windows-sys 0.42.0",
209 | ]
210 |
211 | [[package]]
212 | name = "async-lock"
213 | version = "2.7.0"
214 | source = "registry+https://github.com/rust-lang/crates.io-index"
215 | checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7"
216 | dependencies = [
217 | "event-listener",
218 | ]
219 |
220 | [[package]]
221 | name = "async-mutex"
222 | version = "1.4.0"
223 | source = "registry+https://github.com/rust-lang/crates.io-index"
224 | checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e"
225 | dependencies = [
226 | "event-listener",
227 | ]
228 |
229 | [[package]]
230 | name = "async-net"
231 | version = "1.7.0"
232 | source = "registry+https://github.com/rust-lang/crates.io-index"
233 | checksum = "4051e67316bc7eff608fe723df5d32ed639946adcd69e07df41fd42a7b411f1f"
234 | dependencies = [
235 | "async-io",
236 | "autocfg",
237 | "blocking",
238 | "futures-lite",
239 | ]
240 |
241 | [[package]]
242 | name = "async-process"
243 | version = "1.6.0"
244 | source = "registry+https://github.com/rust-lang/crates.io-index"
245 | checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4"
246 | dependencies = [
247 | "async-io",
248 | "async-lock",
249 | "autocfg",
250 | "blocking",
251 | "cfg-if",
252 | "event-listener",
253 | "futures-lite",
254 | "libc",
255 | "signal-hook",
256 | "windows-sys 0.42.0",
257 | ]
258 |
259 | [[package]]
260 | name = "async-rwlock"
261 | version = "1.3.0"
262 | source = "registry+https://github.com/rust-lang/crates.io-index"
263 | checksum = "261803dcc39ba9e72760ba6e16d0199b1eef9fc44e81bffabbebb9f5aea3906c"
264 | dependencies = [
265 | "async-mutex",
266 | "event-listener",
267 | ]
268 |
269 | [[package]]
270 | name = "async-std"
271 | version = "1.12.0"
272 | source = "registry+https://github.com/rust-lang/crates.io-index"
273 | checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
274 | dependencies = [
275 | "async-attributes",
276 | "async-channel",
277 | "async-global-executor",
278 | "async-io",
279 | "async-lock",
280 | "async-process",
281 | "crossbeam-utils",
282 | "futures-channel",
283 | "futures-core",
284 | "futures-io",
285 | "futures-lite",
286 | "gloo-timers",
287 | "kv-log-macro",
288 | "log",
289 | "memchr",
290 | "once_cell",
291 | "pin-project-lite",
292 | "pin-utils",
293 | "slab",
294 | "wasm-bindgen-futures",
295 | ]
296 |
297 | [[package]]
298 | name = "async-task"
299 | version = "4.3.0"
300 | source = "registry+https://github.com/rust-lang/crates.io-index"
301 | checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524"
302 |
303 | [[package]]
304 | name = "async-trait"
305 | version = "0.1.66"
306 | source = "registry+https://github.com/rust-lang/crates.io-index"
307 | checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc"
308 | dependencies = [
309 | "proc-macro2",
310 | "quote",
311 | "syn",
312 | ]
313 |
314 | [[package]]
315 | name = "async_io_stream"
316 | version = "0.3.3"
317 | source = "registry+https://github.com/rust-lang/crates.io-index"
318 | checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c"
319 | dependencies = [
320 | "futures",
321 | "pharos",
322 | "rustc_version",
323 | ]
324 |
325 | [[package]]
326 | name = "atomic-waker"
327 | version = "1.1.0"
328 | source = "registry+https://github.com/rust-lang/crates.io-index"
329 | checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599"
330 |
331 | [[package]]
332 | name = "atty"
333 | version = "0.2.14"
334 | source = "registry+https://github.com/rust-lang/crates.io-index"
335 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
336 | dependencies = [
337 | "hermit-abi 0.1.19",
338 | "libc",
339 | "winapi",
340 | ]
341 |
342 | [[package]]
343 | name = "autocfg"
344 | version = "1.1.0"
345 | source = "registry+https://github.com/rust-lang/crates.io-index"
346 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
347 |
348 | [[package]]
349 | name = "base64"
350 | version = "0.21.0"
351 | source = "registry+https://github.com/rust-lang/crates.io-index"
352 | checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
353 |
354 | [[package]]
355 | name = "bitflags"
356 | version = "1.3.2"
357 | source = "registry+https://github.com/rust-lang/crates.io-index"
358 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
359 |
360 | [[package]]
361 | name = "block-buffer"
362 | version = "0.10.3"
363 | source = "registry+https://github.com/rust-lang/crates.io-index"
364 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
365 | dependencies = [
366 | "generic-array",
367 | ]
368 |
369 | [[package]]
370 | name = "blocking"
371 | version = "1.3.0"
372 | source = "registry+https://github.com/rust-lang/crates.io-index"
373 | checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8"
374 | dependencies = [
375 | "async-channel",
376 | "async-lock",
377 | "async-task",
378 | "atomic-waker",
379 | "fastrand",
380 | "futures-lite",
381 | ]
382 |
383 | [[package]]
384 | name = "brotli"
385 | version = "3.3.4"
386 | source = "registry+https://github.com/rust-lang/crates.io-index"
387 | checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68"
388 | dependencies = [
389 | "alloc-no-stdlib",
390 | "alloc-stdlib",
391 | "brotli-decompressor",
392 | ]
393 |
394 | [[package]]
395 | name = "brotli-decompressor"
396 | version = "2.3.4"
397 | source = "registry+https://github.com/rust-lang/crates.io-index"
398 | checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744"
399 | dependencies = [
400 | "alloc-no-stdlib",
401 | "alloc-stdlib",
402 | ]
403 |
404 | [[package]]
405 | name = "built"
406 | version = "0.6.0"
407 | source = "registry+https://github.com/rust-lang/crates.io-index"
408 | checksum = "96f9cdd34d6eb553f9ea20e5bf84abb7b13c729f113fc1d8e49dc00ad9fa8738"
409 | dependencies = [
410 | "cargo-lock",
411 | ]
412 |
413 | [[package]]
414 | name = "bumpalo"
415 | version = "3.12.0"
416 | source = "registry+https://github.com/rust-lang/crates.io-index"
417 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
418 |
419 | [[package]]
420 | name = "byteorder"
421 | version = "1.4.3"
422 | source = "registry+https://github.com/rust-lang/crates.io-index"
423 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
424 |
425 | [[package]]
426 | name = "bytes"
427 | version = "1.4.0"
428 | source = "registry+https://github.com/rust-lang/crates.io-index"
429 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
430 |
431 | [[package]]
432 | name = "cargo-lock"
433 | version = "8.0.3"
434 | source = "registry+https://github.com/rust-lang/crates.io-index"
435 | checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996"
436 | dependencies = [
437 | "semver",
438 | "serde",
439 | "toml 0.5.11",
440 | "url",
441 | ]
442 |
443 | [[package]]
444 | name = "cc"
445 | version = "1.0.79"
446 | source = "registry+https://github.com/rust-lang/crates.io-index"
447 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
448 | dependencies = [
449 | "jobserver",
450 | ]
451 |
452 | [[package]]
453 | name = "cfg-if"
454 | version = "1.0.0"
455 | source = "registry+https://github.com/rust-lang/crates.io-index"
456 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
457 |
458 | [[package]]
459 | name = "chrono"
460 | version = "0.4.23"
461 | source = "registry+https://github.com/rust-lang/crates.io-index"
462 | checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
463 | dependencies = [
464 | "iana-time-zone",
465 | "js-sys",
466 | "num-integer",
467 | "num-traits",
468 | "time",
469 | "wasm-bindgen",
470 | "winapi",
471 | ]
472 |
473 | [[package]]
474 | name = "clap"
475 | version = "4.1.8"
476 | source = "registry+https://github.com/rust-lang/crates.io-index"
477 | checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5"
478 | dependencies = [
479 | "bitflags",
480 | "clap_derive",
481 | "clap_lex",
482 | "is-terminal",
483 | "once_cell",
484 | "strsim",
485 | "termcolor",
486 | ]
487 |
488 | [[package]]
489 | name = "clap_derive"
490 | version = "4.1.8"
491 | source = "registry+https://github.com/rust-lang/crates.io-index"
492 | checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0"
493 | dependencies = [
494 | "heck",
495 | "proc-macro-error",
496 | "proc-macro2",
497 | "quote",
498 | "syn",
499 | ]
500 |
501 | [[package]]
502 | name = "clap_lex"
503 | version = "0.3.2"
504 | source = "registry+https://github.com/rust-lang/crates.io-index"
505 | checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09"
506 | dependencies = [
507 | "os_str_bytes",
508 | ]
509 |
510 | [[package]]
511 | name = "codespan-reporting"
512 | version = "0.11.1"
513 | source = "registry+https://github.com/rust-lang/crates.io-index"
514 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
515 | dependencies = [
516 | "termcolor",
517 | "unicode-width",
518 | ]
519 |
520 | [[package]]
521 | name = "colored_json"
522 | version = "3.0.1"
523 | source = "registry+https://github.com/rust-lang/crates.io-index"
524 | checksum = "633215cdbb84194508d4c07c08d06e92ee9d489d54e68d17913d8d1bacfcfdeb"
525 | dependencies = [
526 | "atty",
527 | "serde",
528 | "serde_json",
529 | "yansi",
530 | ]
531 |
532 | [[package]]
533 | name = "concurrent-queue"
534 | version = "2.1.0"
535 | source = "registry+https://github.com/rust-lang/crates.io-index"
536 | checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e"
537 | dependencies = [
538 | "crossbeam-utils",
539 | ]
540 |
541 | [[package]]
542 | name = "const-random"
543 | version = "0.1.15"
544 | source = "registry+https://github.com/rust-lang/crates.io-index"
545 | checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e"
546 | dependencies = [
547 | "const-random-macro",
548 | "proc-macro-hack",
549 | ]
550 |
551 | [[package]]
552 | name = "const-random-macro"
553 | version = "0.1.15"
554 | source = "registry+https://github.com/rust-lang/crates.io-index"
555 | checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb"
556 | dependencies = [
557 | "getrandom",
558 | "once_cell",
559 | "proc-macro-hack",
560 | "tiny-keccak",
561 | ]
562 |
563 | [[package]]
564 | name = "content_inspector"
565 | version = "0.2.4"
566 | source = "registry+https://github.com/rust-lang/crates.io-index"
567 | checksum = "b7bda66e858c683005a53a9a60c69a4aca7eeaa45d124526e389f7aec8e62f38"
568 | dependencies = [
569 | "memchr",
570 | ]
571 |
572 | [[package]]
573 | name = "core-foundation-sys"
574 | version = "0.8.3"
575 | source = "registry+https://github.com/rust-lang/crates.io-index"
576 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc"
577 |
578 | [[package]]
579 | name = "cpufeatures"
580 | version = "0.2.5"
581 | source = "registry+https://github.com/rust-lang/crates.io-index"
582 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"
583 | dependencies = [
584 | "libc",
585 | ]
586 |
587 | [[package]]
588 | name = "crc32c"
589 | version = "0.6.3"
590 | source = "registry+https://github.com/rust-lang/crates.io-index"
591 | checksum = "3dfea2db42e9927a3845fb268a10a72faed6d416065f77873f05e411457c363e"
592 | dependencies = [
593 | "rustc_version",
594 | ]
595 |
596 | [[package]]
597 | name = "crc32fast"
598 | version = "1.3.2"
599 | source = "registry+https://github.com/rust-lang/crates.io-index"
600 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
601 | dependencies = [
602 | "cfg-if",
603 | ]
604 |
605 | [[package]]
606 | name = "crossbeam-channel"
607 | version = "0.5.7"
608 | source = "registry+https://github.com/rust-lang/crates.io-index"
609 | checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c"
610 | dependencies = [
611 | "cfg-if",
612 | "crossbeam-utils",
613 | ]
614 |
615 | [[package]]
616 | name = "crossbeam-deque"
617 | version = "0.8.3"
618 | source = "registry+https://github.com/rust-lang/crates.io-index"
619 | checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
620 | dependencies = [
621 | "cfg-if",
622 | "crossbeam-epoch",
623 | "crossbeam-utils",
624 | ]
625 |
626 | [[package]]
627 | name = "crossbeam-epoch"
628 | version = "0.9.14"
629 | source = "registry+https://github.com/rust-lang/crates.io-index"
630 | checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695"
631 | dependencies = [
632 | "autocfg",
633 | "cfg-if",
634 | "crossbeam-utils",
635 | "memoffset",
636 | "scopeguard",
637 | ]
638 |
639 | [[package]]
640 | name = "crossbeam-utils"
641 | version = "0.8.15"
642 | source = "registry+https://github.com/rust-lang/crates.io-index"
643 | checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
644 | dependencies = [
645 | "cfg-if",
646 | ]
647 |
648 | [[package]]
649 | name = "crunchy"
650 | version = "0.2.2"
651 | source = "registry+https://github.com/rust-lang/crates.io-index"
652 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
653 |
654 | [[package]]
655 | name = "crypto-common"
656 | version = "0.1.6"
657 | source = "registry+https://github.com/rust-lang/crates.io-index"
658 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
659 | dependencies = [
660 | "generic-array",
661 | "typenum",
662 | ]
663 |
664 | [[package]]
665 | name = "ctor"
666 | version = "0.1.26"
667 | source = "registry+https://github.com/rust-lang/crates.io-index"
668 | checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096"
669 | dependencies = [
670 | "quote",
671 | "syn",
672 | ]
673 |
674 | [[package]]
675 | name = "cxx"
676 | version = "1.0.92"
677 | source = "registry+https://github.com/rust-lang/crates.io-index"
678 | checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72"
679 | dependencies = [
680 | "cc",
681 | "cxxbridge-flags",
682 | "cxxbridge-macro",
683 | "link-cplusplus",
684 | ]
685 |
686 | [[package]]
687 | name = "cxx-build"
688 | version = "1.0.92"
689 | source = "registry+https://github.com/rust-lang/crates.io-index"
690 | checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613"
691 | dependencies = [
692 | "cc",
693 | "codespan-reporting",
694 | "once_cell",
695 | "proc-macro2",
696 | "quote",
697 | "scratch",
698 | "syn",
699 | ]
700 |
701 | [[package]]
702 | name = "cxxbridge-flags"
703 | version = "1.0.92"
704 | source = "registry+https://github.com/rust-lang/crates.io-index"
705 | checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97"
706 |
707 | [[package]]
708 | name = "cxxbridge-macro"
709 | version = "1.0.92"
710 | source = "registry+https://github.com/rust-lang/crates.io-index"
711 | checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56"
712 | dependencies = [
713 | "proc-macro2",
714 | "quote",
715 | "syn",
716 | ]
717 |
718 | [[package]]
719 | name = "darling"
720 | version = "0.14.3"
721 | source = "registry+https://github.com/rust-lang/crates.io-index"
722 | checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8"
723 | dependencies = [
724 | "darling_core",
725 | "darling_macro",
726 | ]
727 |
728 | [[package]]
729 | name = "darling_core"
730 | version = "0.14.3"
731 | source = "registry+https://github.com/rust-lang/crates.io-index"
732 | checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb"
733 | dependencies = [
734 | "fnv",
735 | "ident_case",
736 | "proc-macro2",
737 | "quote",
738 | "strsim",
739 | "syn",
740 | ]
741 |
742 | [[package]]
743 | name = "darling_macro"
744 | version = "0.14.3"
745 | source = "registry+https://github.com/rust-lang/crates.io-index"
746 | checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685"
747 | dependencies = [
748 | "darling_core",
749 | "quote",
750 | "syn",
751 | ]
752 |
753 | [[package]]
754 | name = "derive_builder"
755 | version = "0.12.0"
756 | source = "registry+https://github.com/rust-lang/crates.io-index"
757 | checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8"
758 | dependencies = [
759 | "derive_builder_macro",
760 | ]
761 |
762 | [[package]]
763 | name = "derive_builder_core"
764 | version = "0.12.0"
765 | source = "registry+https://github.com/rust-lang/crates.io-index"
766 | checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f"
767 | dependencies = [
768 | "darling",
769 | "proc-macro2",
770 | "quote",
771 | "syn",
772 | ]
773 |
774 | [[package]]
775 | name = "derive_builder_macro"
776 | version = "0.12.0"
777 | source = "registry+https://github.com/rust-lang/crates.io-index"
778 | checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e"
779 | dependencies = [
780 | "derive_builder_core",
781 | "syn",
782 | ]
783 |
784 | [[package]]
785 | name = "digest"
786 | version = "0.10.6"
787 | source = "registry+https://github.com/rust-lang/crates.io-index"
788 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
789 | dependencies = [
790 | "block-buffer",
791 | "crypto-common",
792 | ]
793 |
794 | [[package]]
795 | name = "dirs"
796 | version = "4.0.0"
797 | source = "registry+https://github.com/rust-lang/crates.io-index"
798 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
799 | dependencies = [
800 | "dirs-sys",
801 | ]
802 |
803 | [[package]]
804 | name = "dirs-sys"
805 | version = "0.3.7"
806 | source = "registry+https://github.com/rust-lang/crates.io-index"
807 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
808 | dependencies = [
809 | "libc",
810 | "redox_users",
811 | "winapi",
812 | ]
813 |
814 | [[package]]
815 | name = "educe"
816 | version = "0.4.20"
817 | source = "registry+https://github.com/rust-lang/crates.io-index"
818 | checksum = "cb0188e3c3ba8df5753894d54461f0e39bc91741dc5b22e1c46999ec2c71f4e4"
819 | dependencies = [
820 | "enum-ordinalize",
821 | "proc-macro2",
822 | "quote",
823 | "syn",
824 | ]
825 |
826 | [[package]]
827 | name = "either"
828 | version = "1.8.1"
829 | source = "registry+https://github.com/rust-lang/crates.io-index"
830 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
831 |
832 | [[package]]
833 | name = "enum-ordinalize"
834 | version = "3.1.12"
835 | source = "registry+https://github.com/rust-lang/crates.io-index"
836 | checksum = "a62bb1df8b45ecb7ffa78dca1c17a438fb193eb083db0b1b494d2a61bcb5096a"
837 | dependencies = [
838 | "num-bigint",
839 | "num-traits",
840 | "proc-macro2",
841 | "quote",
842 | "rustc_version",
843 | "syn",
844 | ]
845 |
846 | [[package]]
847 | name = "errno"
848 | version = "0.2.8"
849 | source = "registry+https://github.com/rust-lang/crates.io-index"
850 | checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
851 | dependencies = [
852 | "errno-dragonfly",
853 | "libc",
854 | "winapi",
855 | ]
856 |
857 | [[package]]
858 | name = "errno-dragonfly"
859 | version = "0.1.2"
860 | source = "registry+https://github.com/rust-lang/crates.io-index"
861 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
862 | dependencies = [
863 | "cc",
864 | "libc",
865 | ]
866 |
867 | [[package]]
868 | name = "event-listener"
869 | version = "2.5.3"
870 | source = "registry+https://github.com/rust-lang/crates.io-index"
871 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
872 |
873 | [[package]]
874 | name = "eyre"
875 | version = "0.6.8"
876 | source = "registry+https://github.com/rust-lang/crates.io-index"
877 | checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb"
878 | dependencies = [
879 | "indenter",
880 | "once_cell",
881 | ]
882 |
883 | [[package]]
884 | name = "fastrand"
885 | version = "1.9.0"
886 | source = "registry+https://github.com/rust-lang/crates.io-index"
887 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
888 | dependencies = [
889 | "instant",
890 | ]
891 |
892 | [[package]]
893 | name = "flatbuffers"
894 | version = "23.1.21"
895 | source = "registry+https://github.com/rust-lang/crates.io-index"
896 | checksum = "77f5399c2c9c50ae9418e522842ad362f61ee48b346ac106807bd355a8a7c619"
897 | dependencies = [
898 | "bitflags",
899 | "rustc_version",
900 | ]
901 |
902 | [[package]]
903 | name = "flate2"
904 | version = "1.0.25"
905 | source = "registry+https://github.com/rust-lang/crates.io-index"
906 | checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841"
907 | dependencies = [
908 | "crc32fast",
909 | "miniz_oxide",
910 | ]
911 |
912 | [[package]]
913 | name = "fluvio"
914 | version = "0.17.0"
915 | source = "registry+https://github.com/rust-lang/crates.io-index"
916 | checksum = "cd9ed6e5a1622df2ef577624baf69050716044065cc6e1c7811497e66613c706"
917 | dependencies = [
918 | "anyhow",
919 | "async-channel",
920 | "async-lock",
921 | "async-rwlock",
922 | "async-trait",
923 | "base64",
924 | "bytes",
925 | "cfg-if",
926 | "chrono",
927 | "derive_builder",
928 | "dirs",
929 | "event-listener",
930 | "fluvio-compression",
931 | "fluvio-future",
932 | "fluvio-protocol",
933 | "fluvio-sc-schema",
934 | "fluvio-smartmodule",
935 | "fluvio-socket",
936 | "fluvio-spu-schema",
937 | "fluvio-types",
938 | "futures-util",
939 | "once_cell",
940 | "pin-project-lite",
941 | "semver",
942 | "serde",
943 | "serde_json",
944 | "siphasher",
945 | "thiserror",
946 | "tokio",
947 | "toml 0.7.2",
948 | "tracing",
949 | ]
950 |
951 | [[package]]
952 | name = "fluvio-compression"
953 | version = "0.2.3"
954 | source = "registry+https://github.com/rust-lang/crates.io-index"
955 | checksum = "9c4b1f89e264c963b40bf404b25f683c8218953122fa3d0f54160e02c5ab78bf"
956 | dependencies = [
957 | "bytes",
958 | "flate2",
959 | "lz4_flex",
960 | "serde",
961 | "snap",
962 | "thiserror",
963 | ]
964 |
965 | [[package]]
966 | name = "fluvio-controlplane-metadata"
967 | version = "0.21.0"
968 | source = "registry+https://github.com/rust-lang/crates.io-index"
969 | checksum = "d559208f71a5887d767a8576a882c66805aca0487ee4f0de33b3a9348782a78f"
970 | dependencies = [
971 | "async-trait",
972 | "base64",
973 | "bytes",
974 | "flate2",
975 | "fluvio-future",
976 | "fluvio-protocol",
977 | "fluvio-stream-model",
978 | "fluvio-types",
979 | "flv-util",
980 | "lenient_semver",
981 | "semver",
982 | "serde",
983 | "thiserror",
984 | "toml 0.7.2",
985 | "tracing",
986 | ]
987 |
988 | [[package]]
989 | name = "fluvio-duck"
990 | version = "0.0.0"
991 | dependencies = [
992 | "anyhow",
993 | "chrono",
994 | "clap",
995 | "fluvio",
996 | "fluvio-future",
997 | "fluvio-smartengine",
998 | "fluvio-types",
999 | "futures-lite",
1000 | "jql",
1001 | "libduckdb-sys",
1002 | "parquet",
1003 | "serde_json",
1004 | "tracing",
1005 | ]
1006 |
1007 | [[package]]
1008 | name = "fluvio-future"
1009 | version = "0.4.5"
1010 | source = "registry+https://github.com/rust-lang/crates.io-index"
1011 | checksum = "37174044230084d1cfd7c02f194c5ec127bb8bc17c76f0cd74e943f2fe86ec34"
1012 | dependencies = [
1013 | "async-io",
1014 | "async-net",
1015 | "async-std",
1016 | "async-trait",
1017 | "cfg-if",
1018 | "fluvio-wasm-timer",
1019 | "futures-lite",
1020 | "futures-util",
1021 | "log",
1022 | "openssl",
1023 | "openssl-sys",
1024 | "pin-project",
1025 | "thiserror",
1026 | "tracing",
1027 | "tracing-subscriber",
1028 | "ws_stream_wasm",
1029 | ]
1030 |
1031 | [[package]]
1032 | name = "fluvio-protocol"
1033 | version = "0.8.4"
1034 | source = "registry+https://github.com/rust-lang/crates.io-index"
1035 | checksum = "901733c2edd42073237bce22feacbc10832c38ea08e171c687c921994efc9b07"
1036 | dependencies = [
1037 | "bytes",
1038 | "content_inspector",
1039 | "crc32c",
1040 | "eyre",
1041 | "fluvio-compression",
1042 | "fluvio-future",
1043 | "fluvio-protocol-derive",
1044 | "fluvio-types",
1045 | "flv-util",
1046 | "once_cell",
1047 | "semver",
1048 | "thiserror",
1049 | "tokio-util",
1050 | "tracing",
1051 | ]
1052 |
1053 | [[package]]
1054 | name = "fluvio-protocol-derive"
1055 | version = "0.4.5"
1056 | source = "registry+https://github.com/rust-lang/crates.io-index"
1057 | checksum = "6e9982118d9044e02ec1854df85d164778cf359bf2ce077fdf9c3fad146b0bbc"
1058 | dependencies = [
1059 | "proc-macro2",
1060 | "quote",
1061 | "syn",
1062 | "tracing",
1063 | ]
1064 |
1065 | [[package]]
1066 | name = "fluvio-sc-schema"
1067 | version = "0.17.0"
1068 | source = "registry+https://github.com/rust-lang/crates.io-index"
1069 | checksum = "578e42c08d8f0e40d1e4c5f272115dd5b5b277fcb784da5cbd1b712312408dca"
1070 | dependencies = [
1071 | "fluvio-controlplane-metadata",
1072 | "fluvio-protocol",
1073 | "fluvio-socket",
1074 | "fluvio-types",
1075 | "log",
1076 | "paste",
1077 | "static_assertions",
1078 | "thiserror",
1079 | "tracing",
1080 | ]
1081 |
1082 | [[package]]
1083 | name = "fluvio-smartengine"
1084 | version = "0.6.0"
1085 | source = "registry+https://github.com/rust-lang/crates.io-index"
1086 | checksum = "af4aac8919ddb2119db668cf1c6d30ec207c6862c3c05bc79ff969ef0ffa87d8"
1087 | dependencies = [
1088 | "anyhow",
1089 | "cfg-if",
1090 | "derive_builder",
1091 | "fluvio-future",
1092 | "fluvio-protocol",
1093 | "fluvio-smartmodule",
1094 | "serde",
1095 | "serde_json",
1096 | "serde_yaml",
1097 | "thiserror",
1098 | "tracing",
1099 | ]
1100 |
1101 | [[package]]
1102 | name = "fluvio-smartmodule"
1103 | version = "0.4.0"
1104 | source = "registry+https://github.com/rust-lang/crates.io-index"
1105 | checksum = "9f0b2c08fed6c93a89ca5cd68154e64cc5dee332b3aeb6ec90f0759961353388"
1106 | dependencies = [
1107 | "eyre",
1108 | "fluvio-protocol",
1109 | "fluvio-smartmodule-derive",
1110 | "thiserror",
1111 | "tracing",
1112 | ]
1113 |
1114 | [[package]]
1115 | name = "fluvio-smartmodule-derive"
1116 | version = "0.4.0"
1117 | source = "registry+https://github.com/rust-lang/crates.io-index"
1118 | checksum = "00adc30d860f881c2f3b4f8a50fa4701df6a4928014c731f51884cb9c5bae102"
1119 | dependencies = [
1120 | "proc-macro2",
1121 | "quote",
1122 | "syn",
1123 | ]
1124 |
1125 | [[package]]
1126 | name = "fluvio-socket"
1127 | version = "0.13.3"
1128 | source = "registry+https://github.com/rust-lang/crates.io-index"
1129 | checksum = "e1d7654fc7c679caa7eab7685b1726647283effbdc6cd090a68381e855878a63"
1130 | dependencies = [
1131 | "async-channel",
1132 | "async-lock",
1133 | "async-trait",
1134 | "built",
1135 | "bytes",
1136 | "cfg-if",
1137 | "event-listener",
1138 | "fluvio-future",
1139 | "fluvio-protocol",
1140 | "futures-util",
1141 | "once_cell",
1142 | "pin-project",
1143 | "semver",
1144 | "thiserror",
1145 | "tokio",
1146 | "tokio-util",
1147 | "tracing",
1148 | ]
1149 |
1150 | [[package]]
1151 | name = "fluvio-spu-schema"
1152 | version = "0.12.0"
1153 | source = "registry+https://github.com/rust-lang/crates.io-index"
1154 | checksum = "e8c68a8bc68279b2c037c3f32e7a5d717d28a92ebe9e3dfacf90ef043601e421"
1155 | dependencies = [
1156 | "bytes",
1157 | "educe",
1158 | "flate2",
1159 | "fluvio-future",
1160 | "fluvio-protocol",
1161 | "fluvio-smartmodule",
1162 | "fluvio-types",
1163 | "log",
1164 | "serde",
1165 | "static_assertions",
1166 | "tracing",
1167 | ]
1168 |
1169 | [[package]]
1170 | name = "fluvio-stream-model"
1171 | version = "0.8.4"
1172 | source = "registry+https://github.com/rust-lang/crates.io-index"
1173 | checksum = "af4d2fde86534ef6e649a5ff081fd3623daeb103958c48a5a2e1c543fc18045c"
1174 | dependencies = [
1175 | "async-rwlock",
1176 | "event-listener",
1177 | "once_cell",
1178 | "tracing",
1179 | ]
1180 |
1181 | [[package]]
1182 | name = "fluvio-types"
1183 | version = "0.4.1"
1184 | source = "registry+https://github.com/rust-lang/crates.io-index"
1185 | checksum = "67261282e16cdbb426cacdc29f63d28cb75332109f1f7e2f01f1f650ca765afe"
1186 | dependencies = [
1187 | "event-listener",
1188 | "thiserror",
1189 | "tracing",
1190 | ]
1191 |
1192 | [[package]]
1193 | name = "fluvio-wasm-timer"
1194 | version = "0.2.5"
1195 | source = "registry+https://github.com/rust-lang/crates.io-index"
1196 | checksum = "b768c170dc045fa587a8f948c91f9bcfb87f774930477c6215addf54317f137f"
1197 | dependencies = [
1198 | "futures",
1199 | "js-sys",
1200 | "parking_lot",
1201 | "pin-utils",
1202 | "wasm-bindgen",
1203 | "wasm-bindgen-futures",
1204 | "web-sys",
1205 | ]
1206 |
1207 | [[package]]
1208 | name = "flv-util"
1209 | version = "0.5.2"
1210 | source = "registry+https://github.com/rust-lang/crates.io-index"
1211 | checksum = "de89447c8b4aecfa4c0614d1a7be1c6ab4a0266b59bb2713fd746901f28d124e"
1212 | dependencies = [
1213 | "log",
1214 | "tracing",
1215 | ]
1216 |
1217 | [[package]]
1218 | name = "fnv"
1219 | version = "1.0.7"
1220 | source = "registry+https://github.com/rust-lang/crates.io-index"
1221 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
1222 |
1223 | [[package]]
1224 | name = "foreign-types"
1225 | version = "0.3.2"
1226 | source = "registry+https://github.com/rust-lang/crates.io-index"
1227 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
1228 | dependencies = [
1229 | "foreign-types-shared",
1230 | ]
1231 |
1232 | [[package]]
1233 | name = "foreign-types-shared"
1234 | version = "0.1.1"
1235 | source = "registry+https://github.com/rust-lang/crates.io-index"
1236 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
1237 |
1238 | [[package]]
1239 | name = "form_urlencoded"
1240 | version = "1.1.0"
1241 | source = "registry+https://github.com/rust-lang/crates.io-index"
1242 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
1243 | dependencies = [
1244 | "percent-encoding",
1245 | ]
1246 |
1247 | [[package]]
1248 | name = "futures"
1249 | version = "0.3.26"
1250 | source = "registry+https://github.com/rust-lang/crates.io-index"
1251 | checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84"
1252 | dependencies = [
1253 | "futures-channel",
1254 | "futures-core",
1255 | "futures-executor",
1256 | "futures-io",
1257 | "futures-sink",
1258 | "futures-task",
1259 | "futures-util",
1260 | ]
1261 |
1262 | [[package]]
1263 | name = "futures-channel"
1264 | version = "0.3.26"
1265 | source = "registry+https://github.com/rust-lang/crates.io-index"
1266 | checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5"
1267 | dependencies = [
1268 | "futures-core",
1269 | "futures-sink",
1270 | ]
1271 |
1272 | [[package]]
1273 | name = "futures-core"
1274 | version = "0.3.26"
1275 | source = "registry+https://github.com/rust-lang/crates.io-index"
1276 | checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608"
1277 |
1278 | [[package]]
1279 | name = "futures-executor"
1280 | version = "0.3.26"
1281 | source = "registry+https://github.com/rust-lang/crates.io-index"
1282 | checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e"
1283 | dependencies = [
1284 | "futures-core",
1285 | "futures-task",
1286 | "futures-util",
1287 | ]
1288 |
1289 | [[package]]
1290 | name = "futures-io"
1291 | version = "0.3.26"
1292 | source = "registry+https://github.com/rust-lang/crates.io-index"
1293 | checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531"
1294 |
1295 | [[package]]
1296 | name = "futures-lite"
1297 | version = "1.12.0"
1298 | source = "registry+https://github.com/rust-lang/crates.io-index"
1299 | checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48"
1300 | dependencies = [
1301 | "fastrand",
1302 | "futures-core",
1303 | "futures-io",
1304 | "memchr",
1305 | "parking",
1306 | "pin-project-lite",
1307 | "waker-fn",
1308 | ]
1309 |
1310 | [[package]]
1311 | name = "futures-macro"
1312 | version = "0.3.26"
1313 | source = "registry+https://github.com/rust-lang/crates.io-index"
1314 | checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70"
1315 | dependencies = [
1316 | "proc-macro2",
1317 | "quote",
1318 | "syn",
1319 | ]
1320 |
1321 | [[package]]
1322 | name = "futures-sink"
1323 | version = "0.3.26"
1324 | source = "registry+https://github.com/rust-lang/crates.io-index"
1325 | checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364"
1326 |
1327 | [[package]]
1328 | name = "futures-task"
1329 | version = "0.3.26"
1330 | source = "registry+https://github.com/rust-lang/crates.io-index"
1331 | checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366"
1332 |
1333 | [[package]]
1334 | name = "futures-util"
1335 | version = "0.3.26"
1336 | source = "registry+https://github.com/rust-lang/crates.io-index"
1337 | checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1"
1338 | dependencies = [
1339 | "futures-channel",
1340 | "futures-core",
1341 | "futures-io",
1342 | "futures-macro",
1343 | "futures-sink",
1344 | "futures-task",
1345 | "memchr",
1346 | "pin-project-lite",
1347 | "pin-utils",
1348 | "slab",
1349 | ]
1350 |
1351 | [[package]]
1352 | name = "generic-array"
1353 | version = "0.14.6"
1354 | source = "registry+https://github.com/rust-lang/crates.io-index"
1355 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
1356 | dependencies = [
1357 | "typenum",
1358 | "version_check",
1359 | ]
1360 |
1361 | [[package]]
1362 | name = "getrandom"
1363 | version = "0.2.8"
1364 | source = "registry+https://github.com/rust-lang/crates.io-index"
1365 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
1366 | dependencies = [
1367 | "cfg-if",
1368 | "libc",
1369 | "wasi 0.11.0+wasi-snapshot-preview1",
1370 | ]
1371 |
1372 | [[package]]
1373 | name = "gloo-timers"
1374 | version = "0.2.6"
1375 | source = "registry+https://github.com/rust-lang/crates.io-index"
1376 | checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
1377 | dependencies = [
1378 | "futures-channel",
1379 | "futures-core",
1380 | "js-sys",
1381 | "wasm-bindgen",
1382 | ]
1383 |
1384 | [[package]]
1385 | name = "half"
1386 | version = "2.2.1"
1387 | source = "registry+https://github.com/rust-lang/crates.io-index"
1388 | checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0"
1389 | dependencies = [
1390 | "crunchy",
1391 | "num-traits",
1392 | ]
1393 |
1394 | [[package]]
1395 | name = "hashbrown"
1396 | version = "0.12.3"
1397 | source = "registry+https://github.com/rust-lang/crates.io-index"
1398 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
1399 |
1400 | [[package]]
1401 | name = "hashbrown"
1402 | version = "0.13.2"
1403 | source = "registry+https://github.com/rust-lang/crates.io-index"
1404 | checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
1405 |
1406 | [[package]]
1407 | name = "heck"
1408 | version = "0.4.1"
1409 | source = "registry+https://github.com/rust-lang/crates.io-index"
1410 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
1411 |
1412 | [[package]]
1413 | name = "hermit-abi"
1414 | version = "0.1.19"
1415 | source = "registry+https://github.com/rust-lang/crates.io-index"
1416 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
1417 | dependencies = [
1418 | "libc",
1419 | ]
1420 |
1421 | [[package]]
1422 | name = "hermit-abi"
1423 | version = "0.2.6"
1424 | source = "registry+https://github.com/rust-lang/crates.io-index"
1425 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
1426 | dependencies = [
1427 | "libc",
1428 | ]
1429 |
1430 | [[package]]
1431 | name = "hermit-abi"
1432 | version = "0.3.1"
1433 | source = "registry+https://github.com/rust-lang/crates.io-index"
1434 | checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
1435 |
1436 | [[package]]
1437 | name = "iana-time-zone"
1438 | version = "0.1.53"
1439 | source = "registry+https://github.com/rust-lang/crates.io-index"
1440 | checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
1441 | dependencies = [
1442 | "android_system_properties",
1443 | "core-foundation-sys",
1444 | "iana-time-zone-haiku",
1445 | "js-sys",
1446 | "wasm-bindgen",
1447 | "winapi",
1448 | ]
1449 |
1450 | [[package]]
1451 | name = "iana-time-zone-haiku"
1452 | version = "0.1.1"
1453 | source = "registry+https://github.com/rust-lang/crates.io-index"
1454 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
1455 | dependencies = [
1456 | "cxx",
1457 | "cxx-build",
1458 | ]
1459 |
1460 | [[package]]
1461 | name = "ident_case"
1462 | version = "1.0.1"
1463 | source = "registry+https://github.com/rust-lang/crates.io-index"
1464 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
1465 |
1466 | [[package]]
1467 | name = "idna"
1468 | version = "0.3.0"
1469 | source = "registry+https://github.com/rust-lang/crates.io-index"
1470 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
1471 | dependencies = [
1472 | "unicode-bidi",
1473 | "unicode-normalization",
1474 | ]
1475 |
1476 | [[package]]
1477 | name = "indenter"
1478 | version = "0.3.3"
1479 | source = "registry+https://github.com/rust-lang/crates.io-index"
1480 | checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
1481 |
1482 | [[package]]
1483 | name = "indexmap"
1484 | version = "1.9.2"
1485 | source = "registry+https://github.com/rust-lang/crates.io-index"
1486 | checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
1487 | dependencies = [
1488 | "autocfg",
1489 | "hashbrown 0.12.3",
1490 | ]
1491 |
1492 | [[package]]
1493 | name = "instant"
1494 | version = "0.1.12"
1495 | source = "registry+https://github.com/rust-lang/crates.io-index"
1496 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
1497 | dependencies = [
1498 | "cfg-if",
1499 | "js-sys",
1500 | "wasm-bindgen",
1501 | "web-sys",
1502 | ]
1503 |
1504 | [[package]]
1505 | name = "integer-encoding"
1506 | version = "3.0.4"
1507 | source = "registry+https://github.com/rust-lang/crates.io-index"
1508 | checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02"
1509 |
1510 | [[package]]
1511 | name = "io-lifetimes"
1512 | version = "1.0.6"
1513 | source = "registry+https://github.com/rust-lang/crates.io-index"
1514 | checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3"
1515 | dependencies = [
1516 | "libc",
1517 | "windows-sys 0.45.0",
1518 | ]
1519 |
1520 | [[package]]
1521 | name = "is-terminal"
1522 | version = "0.4.4"
1523 | source = "registry+https://github.com/rust-lang/crates.io-index"
1524 | checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857"
1525 | dependencies = [
1526 | "hermit-abi 0.3.1",
1527 | "io-lifetimes",
1528 | "rustix",
1529 | "windows-sys 0.45.0",
1530 | ]
1531 |
1532 | [[package]]
1533 | name = "itoa"
1534 | version = "1.0.6"
1535 | source = "registry+https://github.com/rust-lang/crates.io-index"
1536 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
1537 |
1538 | [[package]]
1539 | name = "jobserver"
1540 | version = "0.1.26"
1541 | source = "registry+https://github.com/rust-lang/crates.io-index"
1542 | checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
1543 | dependencies = [
1544 | "libc",
1545 | ]
1546 |
1547 | [[package]]
1548 | name = "jql"
1549 | version = "5.1.7"
1550 | source = "registry+https://github.com/rust-lang/crates.io-index"
1551 | checksum = "6df67e21bba7cf86ec221251e09472912d195d3d09a8c883b05326ee508e915b"
1552 | dependencies = [
1553 | "anyhow",
1554 | "async-std",
1555 | "clap",
1556 | "colored_json",
1557 | "pest",
1558 | "pest_derive",
1559 | "rayon",
1560 | "serde_json",
1561 | ]
1562 |
1563 | [[package]]
1564 | name = "js-sys"
1565 | version = "0.3.61"
1566 | source = "registry+https://github.com/rust-lang/crates.io-index"
1567 | checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
1568 | dependencies = [
1569 | "wasm-bindgen",
1570 | ]
1571 |
1572 | [[package]]
1573 | name = "kv-log-macro"
1574 | version = "1.0.7"
1575 | source = "registry+https://github.com/rust-lang/crates.io-index"
1576 | checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
1577 | dependencies = [
1578 | "log",
1579 | ]
1580 |
1581 | [[package]]
1582 | name = "lazy_static"
1583 | version = "1.4.0"
1584 | source = "registry+https://github.com/rust-lang/crates.io-index"
1585 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
1586 |
1587 | [[package]]
1588 | name = "lenient_semver"
1589 | version = "0.4.2"
1590 | source = "registry+https://github.com/rust-lang/crates.io-index"
1591 | checksum = "de8de3f4f3754c280ce1c8c42ed8dd26a9c8385c2e5ad4ec5a77e774cea9c1ec"
1592 | dependencies = [
1593 | "lenient_semver_parser",
1594 | "semver",
1595 | ]
1596 |
1597 | [[package]]
1598 | name = "lenient_semver_parser"
1599 | version = "0.4.2"
1600 | source = "registry+https://github.com/rust-lang/crates.io-index"
1601 | checksum = "7f650c1d024ddc26b4bb79c3076b30030f2cf2b18292af698c81f7337a64d7d6"
1602 | dependencies = [
1603 | "lenient_semver_version_builder",
1604 | "semver",
1605 | ]
1606 |
1607 | [[package]]
1608 | name = "lenient_semver_version_builder"
1609 | version = "0.4.2"
1610 | source = "registry+https://github.com/rust-lang/crates.io-index"
1611 | checksum = "9049f8ff49f75b946f95557148e70230499c8a642bf2d6528246afc7d0282d17"
1612 | dependencies = [
1613 | "semver",
1614 | ]
1615 |
1616 | [[package]]
1617 | name = "lexical-core"
1618 | version = "0.8.5"
1619 | source = "registry+https://github.com/rust-lang/crates.io-index"
1620 | checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46"
1621 | dependencies = [
1622 | "lexical-parse-float",
1623 | "lexical-parse-integer",
1624 | "lexical-util",
1625 | "lexical-write-float",
1626 | "lexical-write-integer",
1627 | ]
1628 |
1629 | [[package]]
1630 | name = "lexical-parse-float"
1631 | version = "0.8.5"
1632 | source = "registry+https://github.com/rust-lang/crates.io-index"
1633 | checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f"
1634 | dependencies = [
1635 | "lexical-parse-integer",
1636 | "lexical-util",
1637 | "static_assertions",
1638 | ]
1639 |
1640 | [[package]]
1641 | name = "lexical-parse-integer"
1642 | version = "0.8.6"
1643 | source = "registry+https://github.com/rust-lang/crates.io-index"
1644 | checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9"
1645 | dependencies = [
1646 | "lexical-util",
1647 | "static_assertions",
1648 | ]
1649 |
1650 | [[package]]
1651 | name = "lexical-util"
1652 | version = "0.8.5"
1653 | source = "registry+https://github.com/rust-lang/crates.io-index"
1654 | checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc"
1655 | dependencies = [
1656 | "static_assertions",
1657 | ]
1658 |
1659 | [[package]]
1660 | name = "lexical-write-float"
1661 | version = "0.8.5"
1662 | source = "registry+https://github.com/rust-lang/crates.io-index"
1663 | checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862"
1664 | dependencies = [
1665 | "lexical-util",
1666 | "lexical-write-integer",
1667 | "static_assertions",
1668 | ]
1669 |
1670 | [[package]]
1671 | name = "lexical-write-integer"
1672 | version = "0.8.5"
1673 | source = "registry+https://github.com/rust-lang/crates.io-index"
1674 | checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446"
1675 | dependencies = [
1676 | "lexical-util",
1677 | "static_assertions",
1678 | ]
1679 |
1680 | [[package]]
1681 | name = "libc"
1682 | version = "0.2.139"
1683 | source = "registry+https://github.com/rust-lang/crates.io-index"
1684 | checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
1685 |
1686 | [[package]]
1687 | name = "libduckdb-sys"
1688 | version = "0.7.1"
1689 | source = "registry+https://github.com/rust-lang/crates.io-index"
1690 | checksum = "418e710926ff3fca20f9f865ebb44dd8d1dbab74ddf0b5d93408bcc278d6d050"
1691 | dependencies = [
1692 | "pkg-config",
1693 | "vcpkg",
1694 | ]
1695 |
1696 | [[package]]
1697 | name = "libm"
1698 | version = "0.2.6"
1699 | source = "registry+https://github.com/rust-lang/crates.io-index"
1700 | checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
1701 |
1702 | [[package]]
1703 | name = "link-cplusplus"
1704 | version = "1.0.8"
1705 | source = "registry+https://github.com/rust-lang/crates.io-index"
1706 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5"
1707 | dependencies = [
1708 | "cc",
1709 | ]
1710 |
1711 | [[package]]
1712 | name = "linux-raw-sys"
1713 | version = "0.1.4"
1714 | source = "registry+https://github.com/rust-lang/crates.io-index"
1715 | checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
1716 |
1717 | [[package]]
1718 | name = "lock_api"
1719 | version = "0.4.9"
1720 | source = "registry+https://github.com/rust-lang/crates.io-index"
1721 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
1722 | dependencies = [
1723 | "autocfg",
1724 | "scopeguard",
1725 | ]
1726 |
1727 | [[package]]
1728 | name = "log"
1729 | version = "0.4.17"
1730 | source = "registry+https://github.com/rust-lang/crates.io-index"
1731 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
1732 | dependencies = [
1733 | "cfg-if",
1734 | "value-bag",
1735 | ]
1736 |
1737 | [[package]]
1738 | name = "lz4"
1739 | version = "1.24.0"
1740 | source = "registry+https://github.com/rust-lang/crates.io-index"
1741 | checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1"
1742 | dependencies = [
1743 | "libc",
1744 | "lz4-sys",
1745 | ]
1746 |
1747 | [[package]]
1748 | name = "lz4-sys"
1749 | version = "1.9.4"
1750 | source = "registry+https://github.com/rust-lang/crates.io-index"
1751 | checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900"
1752 | dependencies = [
1753 | "cc",
1754 | "libc",
1755 | ]
1756 |
1757 | [[package]]
1758 | name = "lz4_flex"
1759 | version = "0.10.0"
1760 | source = "registry+https://github.com/rust-lang/crates.io-index"
1761 | checksum = "8b8c72594ac26bfd34f2d99dfced2edfaddfe8a476e3ff2ca0eb293d925c4f83"
1762 | dependencies = [
1763 | "twox-hash",
1764 | ]
1765 |
1766 | [[package]]
1767 | name = "matchers"
1768 | version = "0.1.0"
1769 | source = "registry+https://github.com/rust-lang/crates.io-index"
1770 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
1771 | dependencies = [
1772 | "regex-automata",
1773 | ]
1774 |
1775 | [[package]]
1776 | name = "memchr"
1777 | version = "2.5.0"
1778 | source = "registry+https://github.com/rust-lang/crates.io-index"
1779 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
1780 |
1781 | [[package]]
1782 | name = "memoffset"
1783 | version = "0.8.0"
1784 | source = "registry+https://github.com/rust-lang/crates.io-index"
1785 | checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
1786 | dependencies = [
1787 | "autocfg",
1788 | ]
1789 |
1790 | [[package]]
1791 | name = "miniz_oxide"
1792 | version = "0.6.2"
1793 | source = "registry+https://github.com/rust-lang/crates.io-index"
1794 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa"
1795 | dependencies = [
1796 | "adler",
1797 | ]
1798 |
1799 | [[package]]
1800 | name = "nu-ansi-term"
1801 | version = "0.46.0"
1802 | source = "registry+https://github.com/rust-lang/crates.io-index"
1803 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
1804 | dependencies = [
1805 | "overload",
1806 | "winapi",
1807 | ]
1808 |
1809 | [[package]]
1810 | name = "num"
1811 | version = "0.4.0"
1812 | source = "registry+https://github.com/rust-lang/crates.io-index"
1813 | checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606"
1814 | dependencies = [
1815 | "num-bigint",
1816 | "num-complex",
1817 | "num-integer",
1818 | "num-iter",
1819 | "num-rational",
1820 | "num-traits",
1821 | ]
1822 |
1823 | [[package]]
1824 | name = "num-bigint"
1825 | version = "0.4.3"
1826 | source = "registry+https://github.com/rust-lang/crates.io-index"
1827 | checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
1828 | dependencies = [
1829 | "autocfg",
1830 | "num-integer",
1831 | "num-traits",
1832 | ]
1833 |
1834 | [[package]]
1835 | name = "num-complex"
1836 | version = "0.4.3"
1837 | source = "registry+https://github.com/rust-lang/crates.io-index"
1838 | checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d"
1839 | dependencies = [
1840 | "num-traits",
1841 | ]
1842 |
1843 | [[package]]
1844 | name = "num-integer"
1845 | version = "0.1.45"
1846 | source = "registry+https://github.com/rust-lang/crates.io-index"
1847 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
1848 | dependencies = [
1849 | "autocfg",
1850 | "num-traits",
1851 | ]
1852 |
1853 | [[package]]
1854 | name = "num-iter"
1855 | version = "0.1.43"
1856 | source = "registry+https://github.com/rust-lang/crates.io-index"
1857 | checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
1858 | dependencies = [
1859 | "autocfg",
1860 | "num-integer",
1861 | "num-traits",
1862 | ]
1863 |
1864 | [[package]]
1865 | name = "num-rational"
1866 | version = "0.4.1"
1867 | source = "registry+https://github.com/rust-lang/crates.io-index"
1868 | checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
1869 | dependencies = [
1870 | "autocfg",
1871 | "num-bigint",
1872 | "num-integer",
1873 | "num-traits",
1874 | ]
1875 |
1876 | [[package]]
1877 | name = "num-traits"
1878 | version = "0.2.15"
1879 | source = "registry+https://github.com/rust-lang/crates.io-index"
1880 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
1881 | dependencies = [
1882 | "autocfg",
1883 | "libm",
1884 | ]
1885 |
1886 | [[package]]
1887 | name = "num_cpus"
1888 | version = "1.15.0"
1889 | source = "registry+https://github.com/rust-lang/crates.io-index"
1890 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
1891 | dependencies = [
1892 | "hermit-abi 0.2.6",
1893 | "libc",
1894 | ]
1895 |
1896 | [[package]]
1897 | name = "once_cell"
1898 | version = "1.17.1"
1899 | source = "registry+https://github.com/rust-lang/crates.io-index"
1900 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
1901 |
1902 | [[package]]
1903 | name = "openssl"
1904 | version = "0.10.45"
1905 | source = "registry+https://github.com/rust-lang/crates.io-index"
1906 | checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1"
1907 | dependencies = [
1908 | "bitflags",
1909 | "cfg-if",
1910 | "foreign-types",
1911 | "libc",
1912 | "once_cell",
1913 | "openssl-macros",
1914 | "openssl-sys",
1915 | ]
1916 |
1917 | [[package]]
1918 | name = "openssl-macros"
1919 | version = "0.1.0"
1920 | source = "registry+https://github.com/rust-lang/crates.io-index"
1921 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c"
1922 | dependencies = [
1923 | "proc-macro2",
1924 | "quote",
1925 | "syn",
1926 | ]
1927 |
1928 | [[package]]
1929 | name = "openssl-src"
1930 | version = "111.25.1+1.1.1t"
1931 | source = "registry+https://github.com/rust-lang/crates.io-index"
1932 | checksum = "1ef9a9cc6ea7d9d5e7c4a913dc4b48d0e359eddf01af1dfec96ba7064b4aba10"
1933 | dependencies = [
1934 | "cc",
1935 | ]
1936 |
1937 | [[package]]
1938 | name = "openssl-sys"
1939 | version = "0.9.80"
1940 | source = "registry+https://github.com/rust-lang/crates.io-index"
1941 | checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7"
1942 | dependencies = [
1943 | "autocfg",
1944 | "cc",
1945 | "libc",
1946 | "openssl-src",
1947 | "pkg-config",
1948 | "vcpkg",
1949 | ]
1950 |
1951 | [[package]]
1952 | name = "ordered-float"
1953 | version = "2.10.0"
1954 | source = "registry+https://github.com/rust-lang/crates.io-index"
1955 | checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87"
1956 | dependencies = [
1957 | "num-traits",
1958 | ]
1959 |
1960 | [[package]]
1961 | name = "os_str_bytes"
1962 | version = "6.4.1"
1963 | source = "registry+https://github.com/rust-lang/crates.io-index"
1964 | checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
1965 |
1966 | [[package]]
1967 | name = "overload"
1968 | version = "0.1.1"
1969 | source = "registry+https://github.com/rust-lang/crates.io-index"
1970 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
1971 |
1972 | [[package]]
1973 | name = "parking"
1974 | version = "2.0.0"
1975 | source = "registry+https://github.com/rust-lang/crates.io-index"
1976 | checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
1977 |
1978 | [[package]]
1979 | name = "parking_lot"
1980 | version = "0.11.2"
1981 | source = "registry+https://github.com/rust-lang/crates.io-index"
1982 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
1983 | dependencies = [
1984 | "instant",
1985 | "lock_api",
1986 | "parking_lot_core",
1987 | ]
1988 |
1989 | [[package]]
1990 | name = "parking_lot_core"
1991 | version = "0.8.6"
1992 | source = "registry+https://github.com/rust-lang/crates.io-index"
1993 | checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
1994 | dependencies = [
1995 | "cfg-if",
1996 | "instant",
1997 | "libc",
1998 | "redox_syscall",
1999 | "smallvec",
2000 | "winapi",
2001 | ]
2002 |
2003 | [[package]]
2004 | name = "parquet"
2005 | version = "34.0.0"
2006 | source = "registry+https://github.com/rust-lang/crates.io-index"
2007 | checksum = "7ac135ecf63ebb5f53dda0921b0b76d6048b3ef631a5f4760b9e8f863ff00cfa"
2008 | dependencies = [
2009 | "ahash",
2010 | "arrow-array",
2011 | "arrow-buffer",
2012 | "arrow-cast",
2013 | "arrow-data",
2014 | "arrow-ipc",
2015 | "arrow-schema",
2016 | "arrow-select",
2017 | "base64",
2018 | "brotli",
2019 | "bytes",
2020 | "chrono",
2021 | "flate2",
2022 | "hashbrown 0.13.2",
2023 | "lz4",
2024 | "num",
2025 | "num-bigint",
2026 | "paste",
2027 | "seq-macro",
2028 | "snap",
2029 | "thrift",
2030 | "twox-hash",
2031 | "zstd",
2032 | ]
2033 |
2034 | [[package]]
2035 | name = "paste"
2036 | version = "1.0.12"
2037 | source = "registry+https://github.com/rust-lang/crates.io-index"
2038 | checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
2039 |
2040 | [[package]]
2041 | name = "percent-encoding"
2042 | version = "2.2.0"
2043 | source = "registry+https://github.com/rust-lang/crates.io-index"
2044 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
2045 |
2046 | [[package]]
2047 | name = "pest"
2048 | version = "2.5.6"
2049 | source = "registry+https://github.com/rust-lang/crates.io-index"
2050 | checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7"
2051 | dependencies = [
2052 | "thiserror",
2053 | "ucd-trie",
2054 | ]
2055 |
2056 | [[package]]
2057 | name = "pest_derive"
2058 | version = "2.5.6"
2059 | source = "registry+https://github.com/rust-lang/crates.io-index"
2060 | checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7"
2061 | dependencies = [
2062 | "pest",
2063 | "pest_generator",
2064 | ]
2065 |
2066 | [[package]]
2067 | name = "pest_generator"
2068 | version = "2.5.6"
2069 | source = "registry+https://github.com/rust-lang/crates.io-index"
2070 | checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b"
2071 | dependencies = [
2072 | "pest",
2073 | "pest_meta",
2074 | "proc-macro2",
2075 | "quote",
2076 | "syn",
2077 | ]
2078 |
2079 | [[package]]
2080 | name = "pest_meta"
2081 | version = "2.5.6"
2082 | source = "registry+https://github.com/rust-lang/crates.io-index"
2083 | checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80"
2084 | dependencies = [
2085 | "once_cell",
2086 | "pest",
2087 | "sha2",
2088 | ]
2089 |
2090 | [[package]]
2091 | name = "pharos"
2092 | version = "0.5.3"
2093 | source = "registry+https://github.com/rust-lang/crates.io-index"
2094 | checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414"
2095 | dependencies = [
2096 | "futures",
2097 | "rustc_version",
2098 | ]
2099 |
2100 | [[package]]
2101 | name = "pin-project"
2102 | version = "1.0.12"
2103 | source = "registry+https://github.com/rust-lang/crates.io-index"
2104 | checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc"
2105 | dependencies = [
2106 | "pin-project-internal",
2107 | ]
2108 |
2109 | [[package]]
2110 | name = "pin-project-internal"
2111 | version = "1.0.12"
2112 | source = "registry+https://github.com/rust-lang/crates.io-index"
2113 | checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55"
2114 | dependencies = [
2115 | "proc-macro2",
2116 | "quote",
2117 | "syn",
2118 | ]
2119 |
2120 | [[package]]
2121 | name = "pin-project-lite"
2122 | version = "0.2.9"
2123 | source = "registry+https://github.com/rust-lang/crates.io-index"
2124 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
2125 |
2126 | [[package]]
2127 | name = "pin-utils"
2128 | version = "0.1.0"
2129 | source = "registry+https://github.com/rust-lang/crates.io-index"
2130 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
2131 |
2132 | [[package]]
2133 | name = "pkg-config"
2134 | version = "0.3.26"
2135 | source = "registry+https://github.com/rust-lang/crates.io-index"
2136 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
2137 |
2138 | [[package]]
2139 | name = "polling"
2140 | version = "2.5.2"
2141 | source = "registry+https://github.com/rust-lang/crates.io-index"
2142 | checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6"
2143 | dependencies = [
2144 | "autocfg",
2145 | "cfg-if",
2146 | "libc",
2147 | "log",
2148 | "wepoll-ffi",
2149 | "windows-sys 0.42.0",
2150 | ]
2151 |
2152 | [[package]]
2153 | name = "proc-macro-error"
2154 | version = "1.0.4"
2155 | source = "registry+https://github.com/rust-lang/crates.io-index"
2156 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
2157 | dependencies = [
2158 | "proc-macro-error-attr",
2159 | "proc-macro2",
2160 | "quote",
2161 | "syn",
2162 | "version_check",
2163 | ]
2164 |
2165 | [[package]]
2166 | name = "proc-macro-error-attr"
2167 | version = "1.0.4"
2168 | source = "registry+https://github.com/rust-lang/crates.io-index"
2169 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
2170 | dependencies = [
2171 | "proc-macro2",
2172 | "quote",
2173 | "version_check",
2174 | ]
2175 |
2176 | [[package]]
2177 | name = "proc-macro-hack"
2178 | version = "0.5.20+deprecated"
2179 | source = "registry+https://github.com/rust-lang/crates.io-index"
2180 | checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
2181 |
2182 | [[package]]
2183 | name = "proc-macro2"
2184 | version = "1.0.51"
2185 | source = "registry+https://github.com/rust-lang/crates.io-index"
2186 | checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6"
2187 | dependencies = [
2188 | "unicode-ident",
2189 | ]
2190 |
2191 | [[package]]
2192 | name = "quote"
2193 | version = "1.0.23"
2194 | source = "registry+https://github.com/rust-lang/crates.io-index"
2195 | checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
2196 | dependencies = [
2197 | "proc-macro2",
2198 | ]
2199 |
2200 | [[package]]
2201 | name = "rayon"
2202 | version = "1.7.0"
2203 | source = "registry+https://github.com/rust-lang/crates.io-index"
2204 | checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
2205 | dependencies = [
2206 | "either",
2207 | "rayon-core",
2208 | ]
2209 |
2210 | [[package]]
2211 | name = "rayon-core"
2212 | version = "1.11.0"
2213 | source = "registry+https://github.com/rust-lang/crates.io-index"
2214 | checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
2215 | dependencies = [
2216 | "crossbeam-channel",
2217 | "crossbeam-deque",
2218 | "crossbeam-utils",
2219 | "num_cpus",
2220 | ]
2221 |
2222 | [[package]]
2223 | name = "redox_syscall"
2224 | version = "0.2.16"
2225 | source = "registry+https://github.com/rust-lang/crates.io-index"
2226 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
2227 | dependencies = [
2228 | "bitflags",
2229 | ]
2230 |
2231 | [[package]]
2232 | name = "redox_users"
2233 | version = "0.4.3"
2234 | source = "registry+https://github.com/rust-lang/crates.io-index"
2235 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
2236 | dependencies = [
2237 | "getrandom",
2238 | "redox_syscall",
2239 | "thiserror",
2240 | ]
2241 |
2242 | [[package]]
2243 | name = "regex"
2244 | version = "1.7.1"
2245 | source = "registry+https://github.com/rust-lang/crates.io-index"
2246 | checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733"
2247 | dependencies = [
2248 | "regex-syntax",
2249 | ]
2250 |
2251 | [[package]]
2252 | name = "regex-automata"
2253 | version = "0.1.10"
2254 | source = "registry+https://github.com/rust-lang/crates.io-index"
2255 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
2256 | dependencies = [
2257 | "regex-syntax",
2258 | ]
2259 |
2260 | [[package]]
2261 | name = "regex-syntax"
2262 | version = "0.6.28"
2263 | source = "registry+https://github.com/rust-lang/crates.io-index"
2264 | checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
2265 |
2266 | [[package]]
2267 | name = "rustc_version"
2268 | version = "0.4.0"
2269 | source = "registry+https://github.com/rust-lang/crates.io-index"
2270 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
2271 | dependencies = [
2272 | "semver",
2273 | ]
2274 |
2275 | [[package]]
2276 | name = "rustix"
2277 | version = "0.36.9"
2278 | source = "registry+https://github.com/rust-lang/crates.io-index"
2279 | checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc"
2280 | dependencies = [
2281 | "bitflags",
2282 | "errno",
2283 | "io-lifetimes",
2284 | "libc",
2285 | "linux-raw-sys",
2286 | "windows-sys 0.45.0",
2287 | ]
2288 |
2289 | [[package]]
2290 | name = "ryu"
2291 | version = "1.0.13"
2292 | source = "registry+https://github.com/rust-lang/crates.io-index"
2293 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
2294 |
2295 | [[package]]
2296 | name = "scopeguard"
2297 | version = "1.1.0"
2298 | source = "registry+https://github.com/rust-lang/crates.io-index"
2299 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
2300 |
2301 | [[package]]
2302 | name = "scratch"
2303 | version = "1.0.5"
2304 | source = "registry+https://github.com/rust-lang/crates.io-index"
2305 | checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
2306 |
2307 | [[package]]
2308 | name = "semver"
2309 | version = "1.0.16"
2310 | source = "registry+https://github.com/rust-lang/crates.io-index"
2311 | checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
2312 | dependencies = [
2313 | "serde",
2314 | ]
2315 |
2316 | [[package]]
2317 | name = "send_wrapper"
2318 | version = "0.6.0"
2319 | source = "registry+https://github.com/rust-lang/crates.io-index"
2320 | checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
2321 |
2322 | [[package]]
2323 | name = "seq-macro"
2324 | version = "0.3.3"
2325 | source = "registry+https://github.com/rust-lang/crates.io-index"
2326 | checksum = "e6b44e8fc93a14e66336d230954dda83d18b4605ccace8fe09bc7514a71ad0bc"
2327 |
2328 | [[package]]
2329 | name = "serde"
2330 | version = "1.0.153"
2331 | source = "registry+https://github.com/rust-lang/crates.io-index"
2332 | checksum = "3a382c72b4ba118526e187430bb4963cd6d55051ebf13d9b25574d379cc98d20"
2333 | dependencies = [
2334 | "serde_derive",
2335 | ]
2336 |
2337 | [[package]]
2338 | name = "serde_derive"
2339 | version = "1.0.153"
2340 | source = "registry+https://github.com/rust-lang/crates.io-index"
2341 | checksum = "1ef476a5790f0f6decbc66726b6e5d63680ed518283e64c7df415989d880954f"
2342 | dependencies = [
2343 | "proc-macro2",
2344 | "quote",
2345 | "syn",
2346 | ]
2347 |
2348 | [[package]]
2349 | name = "serde_json"
2350 | version = "1.0.94"
2351 | source = "registry+https://github.com/rust-lang/crates.io-index"
2352 | checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea"
2353 | dependencies = [
2354 | "indexmap",
2355 | "itoa",
2356 | "ryu",
2357 | "serde",
2358 | ]
2359 |
2360 | [[package]]
2361 | name = "serde_spanned"
2362 | version = "0.6.1"
2363 | source = "registry+https://github.com/rust-lang/crates.io-index"
2364 | checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4"
2365 | dependencies = [
2366 | "serde",
2367 | ]
2368 |
2369 | [[package]]
2370 | name = "serde_yaml"
2371 | version = "0.9.19"
2372 | source = "registry+https://github.com/rust-lang/crates.io-index"
2373 | checksum = "f82e6c8c047aa50a7328632d067bcae6ef38772a79e28daf32f735e0e4f3dd10"
2374 | dependencies = [
2375 | "indexmap",
2376 | "itoa",
2377 | "ryu",
2378 | "serde",
2379 | "unsafe-libyaml",
2380 | ]
2381 |
2382 | [[package]]
2383 | name = "sha2"
2384 | version = "0.10.6"
2385 | source = "registry+https://github.com/rust-lang/crates.io-index"
2386 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
2387 | dependencies = [
2388 | "cfg-if",
2389 | "cpufeatures",
2390 | "digest",
2391 | ]
2392 |
2393 | [[package]]
2394 | name = "sharded-slab"
2395 | version = "0.1.4"
2396 | source = "registry+https://github.com/rust-lang/crates.io-index"
2397 | checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31"
2398 | dependencies = [
2399 | "lazy_static",
2400 | ]
2401 |
2402 | [[package]]
2403 | name = "signal-hook"
2404 | version = "0.3.15"
2405 | source = "registry+https://github.com/rust-lang/crates.io-index"
2406 | checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9"
2407 | dependencies = [
2408 | "libc",
2409 | "signal-hook-registry",
2410 | ]
2411 |
2412 | [[package]]
2413 | name = "signal-hook-registry"
2414 | version = "1.4.1"
2415 | source = "registry+https://github.com/rust-lang/crates.io-index"
2416 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
2417 | dependencies = [
2418 | "libc",
2419 | ]
2420 |
2421 | [[package]]
2422 | name = "siphasher"
2423 | version = "0.3.10"
2424 | source = "registry+https://github.com/rust-lang/crates.io-index"
2425 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
2426 |
2427 | [[package]]
2428 | name = "slab"
2429 | version = "0.4.8"
2430 | source = "registry+https://github.com/rust-lang/crates.io-index"
2431 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
2432 | dependencies = [
2433 | "autocfg",
2434 | ]
2435 |
2436 | [[package]]
2437 | name = "smallvec"
2438 | version = "1.10.0"
2439 | source = "registry+https://github.com/rust-lang/crates.io-index"
2440 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
2441 |
2442 | [[package]]
2443 | name = "snap"
2444 | version = "1.1.0"
2445 | source = "registry+https://github.com/rust-lang/crates.io-index"
2446 | checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831"
2447 |
2448 | [[package]]
2449 | name = "socket2"
2450 | version = "0.4.9"
2451 | source = "registry+https://github.com/rust-lang/crates.io-index"
2452 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
2453 | dependencies = [
2454 | "libc",
2455 | "winapi",
2456 | ]
2457 |
2458 | [[package]]
2459 | name = "static_assertions"
2460 | version = "1.1.0"
2461 | source = "registry+https://github.com/rust-lang/crates.io-index"
2462 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
2463 |
2464 | [[package]]
2465 | name = "strsim"
2466 | version = "0.10.0"
2467 | source = "registry+https://github.com/rust-lang/crates.io-index"
2468 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
2469 |
2470 | [[package]]
2471 | name = "syn"
2472 | version = "1.0.109"
2473 | source = "registry+https://github.com/rust-lang/crates.io-index"
2474 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
2475 | dependencies = [
2476 | "proc-macro2",
2477 | "quote",
2478 | "unicode-ident",
2479 | ]
2480 |
2481 | [[package]]
2482 | name = "termcolor"
2483 | version = "1.2.0"
2484 | source = "registry+https://github.com/rust-lang/crates.io-index"
2485 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
2486 | dependencies = [
2487 | "winapi-util",
2488 | ]
2489 |
2490 | [[package]]
2491 | name = "thiserror"
2492 | version = "1.0.39"
2493 | source = "registry+https://github.com/rust-lang/crates.io-index"
2494 | checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c"
2495 | dependencies = [
2496 | "thiserror-impl",
2497 | ]
2498 |
2499 | [[package]]
2500 | name = "thiserror-impl"
2501 | version = "1.0.39"
2502 | source = "registry+https://github.com/rust-lang/crates.io-index"
2503 | checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e"
2504 | dependencies = [
2505 | "proc-macro2",
2506 | "quote",
2507 | "syn",
2508 | ]
2509 |
2510 | [[package]]
2511 | name = "thread_local"
2512 | version = "1.1.7"
2513 | source = "registry+https://github.com/rust-lang/crates.io-index"
2514 | checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
2515 | dependencies = [
2516 | "cfg-if",
2517 | "once_cell",
2518 | ]
2519 |
2520 | [[package]]
2521 | name = "thrift"
2522 | version = "0.17.0"
2523 | source = "registry+https://github.com/rust-lang/crates.io-index"
2524 | checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09"
2525 | dependencies = [
2526 | "byteorder",
2527 | "integer-encoding",
2528 | "ordered-float",
2529 | ]
2530 |
2531 | [[package]]
2532 | name = "time"
2533 | version = "0.1.45"
2534 | source = "registry+https://github.com/rust-lang/crates.io-index"
2535 | checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
2536 | dependencies = [
2537 | "libc",
2538 | "wasi 0.10.0+wasi-snapshot-preview1",
2539 | "winapi",
2540 | ]
2541 |
2542 | [[package]]
2543 | name = "tiny-keccak"
2544 | version = "2.0.2"
2545 | source = "registry+https://github.com/rust-lang/crates.io-index"
2546 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
2547 | dependencies = [
2548 | "crunchy",
2549 | ]
2550 |
2551 | [[package]]
2552 | name = "tinyvec"
2553 | version = "1.6.0"
2554 | source = "registry+https://github.com/rust-lang/crates.io-index"
2555 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
2556 | dependencies = [
2557 | "tinyvec_macros",
2558 | ]
2559 |
2560 | [[package]]
2561 | name = "tinyvec_macros"
2562 | version = "0.1.1"
2563 | source = "registry+https://github.com/rust-lang/crates.io-index"
2564 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
2565 |
2566 | [[package]]
2567 | name = "tokio"
2568 | version = "1.26.0"
2569 | source = "registry+https://github.com/rust-lang/crates.io-index"
2570 | checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64"
2571 | dependencies = [
2572 | "autocfg",
2573 | "pin-project-lite",
2574 | "tokio-macros",
2575 | "windows-sys 0.45.0",
2576 | ]
2577 |
2578 | [[package]]
2579 | name = "tokio-macros"
2580 | version = "1.8.2"
2581 | source = "registry+https://github.com/rust-lang/crates.io-index"
2582 | checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8"
2583 | dependencies = [
2584 | "proc-macro2",
2585 | "quote",
2586 | "syn",
2587 | ]
2588 |
2589 | [[package]]
2590 | name = "tokio-util"
2591 | version = "0.7.7"
2592 | source = "registry+https://github.com/rust-lang/crates.io-index"
2593 | checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2"
2594 | dependencies = [
2595 | "bytes",
2596 | "futures-core",
2597 | "futures-io",
2598 | "futures-sink",
2599 | "pin-project-lite",
2600 | "tokio",
2601 | "tracing",
2602 | ]
2603 |
2604 | [[package]]
2605 | name = "toml"
2606 | version = "0.5.11"
2607 | source = "registry+https://github.com/rust-lang/crates.io-index"
2608 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
2609 | dependencies = [
2610 | "serde",
2611 | ]
2612 |
2613 | [[package]]
2614 | name = "toml"
2615 | version = "0.7.2"
2616 | source = "registry+https://github.com/rust-lang/crates.io-index"
2617 | checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6"
2618 | dependencies = [
2619 | "serde",
2620 | "serde_spanned",
2621 | "toml_datetime",
2622 | "toml_edit",
2623 | ]
2624 |
2625 | [[package]]
2626 | name = "toml_datetime"
2627 | version = "0.6.1"
2628 | source = "registry+https://github.com/rust-lang/crates.io-index"
2629 | checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
2630 | dependencies = [
2631 | "serde",
2632 | ]
2633 |
2634 | [[package]]
2635 | name = "toml_edit"
2636 | version = "0.19.4"
2637 | source = "registry+https://github.com/rust-lang/crates.io-index"
2638 | checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825"
2639 | dependencies = [
2640 | "indexmap",
2641 | "serde",
2642 | "serde_spanned",
2643 | "toml_datetime",
2644 | "winnow",
2645 | ]
2646 |
2647 | [[package]]
2648 | name = "tracing"
2649 | version = "0.1.37"
2650 | source = "registry+https://github.com/rust-lang/crates.io-index"
2651 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
2652 | dependencies = [
2653 | "cfg-if",
2654 | "pin-project-lite",
2655 | "tracing-attributes",
2656 | "tracing-core",
2657 | ]
2658 |
2659 | [[package]]
2660 | name = "tracing-attributes"
2661 | version = "0.1.23"
2662 | source = "registry+https://github.com/rust-lang/crates.io-index"
2663 | checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a"
2664 | dependencies = [
2665 | "proc-macro2",
2666 | "quote",
2667 | "syn",
2668 | ]
2669 |
2670 | [[package]]
2671 | name = "tracing-core"
2672 | version = "0.1.30"
2673 | source = "registry+https://github.com/rust-lang/crates.io-index"
2674 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a"
2675 | dependencies = [
2676 | "once_cell",
2677 | "valuable",
2678 | ]
2679 |
2680 | [[package]]
2681 | name = "tracing-log"
2682 | version = "0.1.3"
2683 | source = "registry+https://github.com/rust-lang/crates.io-index"
2684 | checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922"
2685 | dependencies = [
2686 | "lazy_static",
2687 | "log",
2688 | "tracing-core",
2689 | ]
2690 |
2691 | [[package]]
2692 | name = "tracing-subscriber"
2693 | version = "0.3.16"
2694 | source = "registry+https://github.com/rust-lang/crates.io-index"
2695 | checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70"
2696 | dependencies = [
2697 | "matchers",
2698 | "nu-ansi-term",
2699 | "once_cell",
2700 | "regex",
2701 | "sharded-slab",
2702 | "smallvec",
2703 | "thread_local",
2704 | "tracing",
2705 | "tracing-core",
2706 | "tracing-log",
2707 | ]
2708 |
2709 | [[package]]
2710 | name = "twox-hash"
2711 | version = "1.6.3"
2712 | source = "registry+https://github.com/rust-lang/crates.io-index"
2713 | checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
2714 | dependencies = [
2715 | "cfg-if",
2716 | "static_assertions",
2717 | ]
2718 |
2719 | [[package]]
2720 | name = "typenum"
2721 | version = "1.16.0"
2722 | source = "registry+https://github.com/rust-lang/crates.io-index"
2723 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
2724 |
2725 | [[package]]
2726 | name = "ucd-trie"
2727 | version = "0.1.5"
2728 | source = "registry+https://github.com/rust-lang/crates.io-index"
2729 | checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81"
2730 |
2731 | [[package]]
2732 | name = "unicode-bidi"
2733 | version = "0.3.10"
2734 | source = "registry+https://github.com/rust-lang/crates.io-index"
2735 | checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58"
2736 |
2737 | [[package]]
2738 | name = "unicode-ident"
2739 | version = "1.0.8"
2740 | source = "registry+https://github.com/rust-lang/crates.io-index"
2741 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
2742 |
2743 | [[package]]
2744 | name = "unicode-normalization"
2745 | version = "0.1.22"
2746 | source = "registry+https://github.com/rust-lang/crates.io-index"
2747 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
2748 | dependencies = [
2749 | "tinyvec",
2750 | ]
2751 |
2752 | [[package]]
2753 | name = "unicode-width"
2754 | version = "0.1.10"
2755 | source = "registry+https://github.com/rust-lang/crates.io-index"
2756 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
2757 |
2758 | [[package]]
2759 | name = "unsafe-libyaml"
2760 | version = "0.2.7"
2761 | source = "registry+https://github.com/rust-lang/crates.io-index"
2762 | checksum = "ad2024452afd3874bf539695e04af6732ba06517424dbf958fdb16a01f3bef6c"
2763 |
2764 | [[package]]
2765 | name = "url"
2766 | version = "2.3.1"
2767 | source = "registry+https://github.com/rust-lang/crates.io-index"
2768 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
2769 | dependencies = [
2770 | "form_urlencoded",
2771 | "idna",
2772 | "percent-encoding",
2773 | ]
2774 |
2775 | [[package]]
2776 | name = "valuable"
2777 | version = "0.1.0"
2778 | source = "registry+https://github.com/rust-lang/crates.io-index"
2779 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
2780 |
2781 | [[package]]
2782 | name = "value-bag"
2783 | version = "1.0.0-alpha.9"
2784 | source = "registry+https://github.com/rust-lang/crates.io-index"
2785 | checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55"
2786 | dependencies = [
2787 | "ctor",
2788 | "version_check",
2789 | ]
2790 |
2791 | [[package]]
2792 | name = "vcpkg"
2793 | version = "0.2.15"
2794 | source = "registry+https://github.com/rust-lang/crates.io-index"
2795 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
2796 |
2797 | [[package]]
2798 | name = "version_check"
2799 | version = "0.9.4"
2800 | source = "registry+https://github.com/rust-lang/crates.io-index"
2801 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
2802 |
2803 | [[package]]
2804 | name = "waker-fn"
2805 | version = "1.1.0"
2806 | source = "registry+https://github.com/rust-lang/crates.io-index"
2807 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
2808 |
2809 | [[package]]
2810 | name = "wasi"
2811 | version = "0.10.0+wasi-snapshot-preview1"
2812 | source = "registry+https://github.com/rust-lang/crates.io-index"
2813 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
2814 |
2815 | [[package]]
2816 | name = "wasi"
2817 | version = "0.11.0+wasi-snapshot-preview1"
2818 | source = "registry+https://github.com/rust-lang/crates.io-index"
2819 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
2820 |
2821 | [[package]]
2822 | name = "wasm-bindgen"
2823 | version = "0.2.84"
2824 | source = "registry+https://github.com/rust-lang/crates.io-index"
2825 | checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
2826 | dependencies = [
2827 | "cfg-if",
2828 | "wasm-bindgen-macro",
2829 | ]
2830 |
2831 | [[package]]
2832 | name = "wasm-bindgen-backend"
2833 | version = "0.2.84"
2834 | source = "registry+https://github.com/rust-lang/crates.io-index"
2835 | checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
2836 | dependencies = [
2837 | "bumpalo",
2838 | "log",
2839 | "once_cell",
2840 | "proc-macro2",
2841 | "quote",
2842 | "syn",
2843 | "wasm-bindgen-shared",
2844 | ]
2845 |
2846 | [[package]]
2847 | name = "wasm-bindgen-futures"
2848 | version = "0.4.34"
2849 | source = "registry+https://github.com/rust-lang/crates.io-index"
2850 | checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454"
2851 | dependencies = [
2852 | "cfg-if",
2853 | "js-sys",
2854 | "wasm-bindgen",
2855 | "web-sys",
2856 | ]
2857 |
2858 | [[package]]
2859 | name = "wasm-bindgen-macro"
2860 | version = "0.2.84"
2861 | source = "registry+https://github.com/rust-lang/crates.io-index"
2862 | checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
2863 | dependencies = [
2864 | "quote",
2865 | "wasm-bindgen-macro-support",
2866 | ]
2867 |
2868 | [[package]]
2869 | name = "wasm-bindgen-macro-support"
2870 | version = "0.2.84"
2871 | source = "registry+https://github.com/rust-lang/crates.io-index"
2872 | checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
2873 | dependencies = [
2874 | "proc-macro2",
2875 | "quote",
2876 | "syn",
2877 | "wasm-bindgen-backend",
2878 | "wasm-bindgen-shared",
2879 | ]
2880 |
2881 | [[package]]
2882 | name = "wasm-bindgen-shared"
2883 | version = "0.2.84"
2884 | source = "registry+https://github.com/rust-lang/crates.io-index"
2885 | checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
2886 |
2887 | [[package]]
2888 | name = "web-sys"
2889 | version = "0.3.61"
2890 | source = "registry+https://github.com/rust-lang/crates.io-index"
2891 | checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
2892 | dependencies = [
2893 | "js-sys",
2894 | "wasm-bindgen",
2895 | ]
2896 |
2897 | [[package]]
2898 | name = "wepoll-ffi"
2899 | version = "0.1.2"
2900 | source = "registry+https://github.com/rust-lang/crates.io-index"
2901 | checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
2902 | dependencies = [
2903 | "cc",
2904 | ]
2905 |
2906 | [[package]]
2907 | name = "winapi"
2908 | version = "0.3.9"
2909 | source = "registry+https://github.com/rust-lang/crates.io-index"
2910 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
2911 | dependencies = [
2912 | "winapi-i686-pc-windows-gnu",
2913 | "winapi-x86_64-pc-windows-gnu",
2914 | ]
2915 |
2916 | [[package]]
2917 | name = "winapi-i686-pc-windows-gnu"
2918 | version = "0.4.0"
2919 | source = "registry+https://github.com/rust-lang/crates.io-index"
2920 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
2921 |
2922 | [[package]]
2923 | name = "winapi-util"
2924 | version = "0.1.5"
2925 | source = "registry+https://github.com/rust-lang/crates.io-index"
2926 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
2927 | dependencies = [
2928 | "winapi",
2929 | ]
2930 |
2931 | [[package]]
2932 | name = "winapi-x86_64-pc-windows-gnu"
2933 | version = "0.4.0"
2934 | source = "registry+https://github.com/rust-lang/crates.io-index"
2935 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
2936 |
2937 | [[package]]
2938 | name = "windows-sys"
2939 | version = "0.42.0"
2940 | source = "registry+https://github.com/rust-lang/crates.io-index"
2941 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
2942 | dependencies = [
2943 | "windows_aarch64_gnullvm",
2944 | "windows_aarch64_msvc",
2945 | "windows_i686_gnu",
2946 | "windows_i686_msvc",
2947 | "windows_x86_64_gnu",
2948 | "windows_x86_64_gnullvm",
2949 | "windows_x86_64_msvc",
2950 | ]
2951 |
2952 | [[package]]
2953 | name = "windows-sys"
2954 | version = "0.45.0"
2955 | source = "registry+https://github.com/rust-lang/crates.io-index"
2956 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
2957 | dependencies = [
2958 | "windows-targets",
2959 | ]
2960 |
2961 | [[package]]
2962 | name = "windows-targets"
2963 | version = "0.42.1"
2964 | source = "registry+https://github.com/rust-lang/crates.io-index"
2965 | checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
2966 | dependencies = [
2967 | "windows_aarch64_gnullvm",
2968 | "windows_aarch64_msvc",
2969 | "windows_i686_gnu",
2970 | "windows_i686_msvc",
2971 | "windows_x86_64_gnu",
2972 | "windows_x86_64_gnullvm",
2973 | "windows_x86_64_msvc",
2974 | ]
2975 |
2976 | [[package]]
2977 | name = "windows_aarch64_gnullvm"
2978 | version = "0.42.1"
2979 | source = "registry+https://github.com/rust-lang/crates.io-index"
2980 | checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
2981 |
2982 | [[package]]
2983 | name = "windows_aarch64_msvc"
2984 | version = "0.42.1"
2985 | source = "registry+https://github.com/rust-lang/crates.io-index"
2986 | checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
2987 |
2988 | [[package]]
2989 | name = "windows_i686_gnu"
2990 | version = "0.42.1"
2991 | source = "registry+https://github.com/rust-lang/crates.io-index"
2992 | checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
2993 |
2994 | [[package]]
2995 | name = "windows_i686_msvc"
2996 | version = "0.42.1"
2997 | source = "registry+https://github.com/rust-lang/crates.io-index"
2998 | checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
2999 |
3000 | [[package]]
3001 | name = "windows_x86_64_gnu"
3002 | version = "0.42.1"
3003 | source = "registry+https://github.com/rust-lang/crates.io-index"
3004 | checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
3005 |
3006 | [[package]]
3007 | name = "windows_x86_64_gnullvm"
3008 | version = "0.42.1"
3009 | source = "registry+https://github.com/rust-lang/crates.io-index"
3010 | checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
3011 |
3012 | [[package]]
3013 | name = "windows_x86_64_msvc"
3014 | version = "0.42.1"
3015 | source = "registry+https://github.com/rust-lang/crates.io-index"
3016 | checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
3017 |
3018 | [[package]]
3019 | name = "winnow"
3020 | version = "0.3.5"
3021 | source = "registry+https://github.com/rust-lang/crates.io-index"
3022 | checksum = "ee7b2c67f962bf5042bfd8b6a916178df33a26eec343ae064cb8e069f638fa6f"
3023 | dependencies = [
3024 | "memchr",
3025 | ]
3026 |
3027 | [[package]]
3028 | name = "ws_stream_wasm"
3029 | version = "0.7.4"
3030 | source = "registry+https://github.com/rust-lang/crates.io-index"
3031 | checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5"
3032 | dependencies = [
3033 | "async_io_stream",
3034 | "futures",
3035 | "js-sys",
3036 | "log",
3037 | "pharos",
3038 | "rustc_version",
3039 | "send_wrapper",
3040 | "thiserror",
3041 | "wasm-bindgen",
3042 | "wasm-bindgen-futures",
3043 | "web-sys",
3044 | ]
3045 |
3046 | [[package]]
3047 | name = "yansi"
3048 | version = "0.5.1"
3049 | source = "registry+https://github.com/rust-lang/crates.io-index"
3050 | checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
3051 |
3052 | [[package]]
3053 | name = "zstd"
3054 | version = "0.12.3+zstd.1.5.2"
3055 | source = "registry+https://github.com/rust-lang/crates.io-index"
3056 | checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806"
3057 | dependencies = [
3058 | "zstd-safe",
3059 | ]
3060 |
3061 | [[package]]
3062 | name = "zstd-safe"
3063 | version = "6.0.4+zstd.1.5.4"
3064 | source = "registry+https://github.com/rust-lang/crates.io-index"
3065 | checksum = "7afb4b54b8910cf5447638cb54bf4e8a65cbedd783af98b98c62ffe91f185543"
3066 | dependencies = [
3067 | "libc",
3068 | "zstd-sys",
3069 | ]
3070 |
3071 | [[package]]
3072 | name = "zstd-sys"
3073 | version = "2.0.7+zstd.1.5.4"
3074 | source = "registry+https://github.com/rust-lang/crates.io-index"
3075 | checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5"
3076 | dependencies = [
3077 | "cc",
3078 | "libc",
3079 | "pkg-config",
3080 | ]
3081 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "fluvio-duck"
3 | edition = "2021"
4 | version = "0.0.0"
5 | authors = ["fluvio.io"]
6 | description = "Fluvio Duck"
7 | repository = "https://github.com/infinyon/fluvio"
8 | license = "Apache-2.0"
9 | publish = false
10 |
11 |
12 | [lib]
13 | name = "fluvioduck"
14 | crate-type = ["staticlib"]
15 |
16 | [dependencies]
17 | anyhow = "1.0.38"
18 | libduckdb-sys = "0.7.1"
19 | parquet = "34"
20 | futures-lite = "1.11.3"
21 | clap = { version = "4.0.10", features = [
22 | "std",
23 | "derive",
24 | "string",
25 | "help",
26 | "usage",
27 | "env",
28 | "error-context",
29 | ], default-features = false }
30 | jql = "5.1.4"
31 | serde_json = "1.0.91"
32 | tracing = "0.1.19"
33 | chrono = "0.4.23"
34 |
35 | # Fluvio dependencies
36 | fluvio = { version = "0.17.0 " }
37 | fluvio-types = { version = "0.4.0" }
38 | fluvio-smartengine = { version = "0.6.0", features = [
39 | "transformation",
40 | ], default-features = false }
41 | fluvio-future = { version = "0.4.0", features = ["subscriber"]}
42 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | OSX_BUILD_UNIVERSAL_FLAG=
2 | ifeq (${OSX_BUILD_UNIVERSAL}, 1)
3 | OSX_BUILD_UNIVERSAL_FLAG=-DOSX_BUILD_UNIVERSAL=1
4 | endif
5 |
6 | ifeq ($(GEN),ninja)
7 | GENERATOR=-G "Ninja"
8 | FORCE_COLOR=-DFORCE_COLORED_OUTPUT=1
9 | endif
10 |
11 |
12 | BUILD_FLAGS=-DEXTENSION_STATIC_BUILD=1 ${OSX_BUILD_UNIVERSAL_FLAG}
13 |
14 | pull:
15 | git submodule init
16 | # git submodule update --recursive --remote
17 |
18 |
19 | # Update duckdb to specific branch
20 | update_duckdb:
21 | git submodule update --recursive --remote
22 | cd duckdb && git checkout -b ${DUCKDB_BRANCH}
23 |
24 | clean:
25 | rm -rf build
26 | cargo clean
27 |
28 | debug: pull
29 | mkdir -p build/debug && \
30 | cd build/debug && \
31 | cmake $(GENERATOR) $(FORCE_COLOR) -DCMAKE_BUILD_TYPE=Debug ${BUILD_FLAGS} ../../duckdb/CMakeLists.txt -DEXTERNAL_EXTENSION_DIRECTORIES=../../fluvio-duck -B. && \
32 | cmake --build . --config Debug
33 |
34 | release: pull
35 | mkdir -p build/release && \
36 | cd build/release && \
37 | cmake $(GENERATOR) $(FORCE_COLOR) -DCMAKE_BUILD_TYPE=RelWithDebInfo ${BUILD_FLAGS} ../../duckdb/CMakeLists.txt -DEXTERNAL_EXTENSION_DIRECTORIES=../../fluvio-duck -B. && \
38 | cmake --build . --config Release
39 |
40 | install-clippy:
41 | rustup component add clippy
42 |
43 | install-fmt:
44 | rustup component add rustfmt
45 |
46 |
47 | check-clippy: install-clippy
48 | cargo clippy --all-features
49 |
50 | check-fmt: install-fmt
51 | cargo fmt -- --check
52 |
53 |
54 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | fluvio-duck is a DuckDB extension to work with Fluvio streaming platform. It allows you to query Fluvio topics and partitions using SQL. It also allows you to consume Fluvio topics using SQL.
4 |
5 | # Building extension
6 |
7 | For debugging and testing
8 | ## Debug
9 |
10 | Execute the following command to build the extension in debug mode:
11 | ```
12 | make debug
13 | ```
14 |
15 | Loading extension:
16 |
17 | ```
18 | $ ./build/debug/duckdb --unsigned
19 |
20 | D load './build/debug/extension/fluvio-duck/fluvioduck.duckdb_extension';
21 | ```
22 |
23 | Note that Debug mode should not be used for large data sets. It is very slow.
24 |
25 | ## Release
26 |
27 | Execute the following command to build the extension in release mode. Note that building release will take longer than debug mode.
28 |
29 | ```
30 | make release
31 | ```
32 |
33 | Loading extension:
34 |
35 | ```
36 | $ ./build/release/duckdb --unsigned
37 | D load './build/release/extension/fluvio-duck/fluvioduck.duckdb_extension';
38 | ```
39 |
40 | # Using fluvio-duck extension
41 |
42 | Load either debug or release version of the extension as in the previous section.
43 |
44 |
45 | ## Getting topics and partitions
46 |
47 | You can use the following commands to get list of topics and partitions.
48 |
49 | To get list of topics:
50 | ```
51 | D select * from fluvio_topics();
52 | ┌───────────┬────────────┐
53 | │ name │ partitions │
54 | │ varchar │ int32 │
55 | ├───────────┼────────────┤
56 | │ helsinki │ 1 │
57 | │ cat-facts │ 1 │
58 | └───────────┴────────────┘
59 | ```
60 |
61 | To get list of partitions:
62 | ```
63 | select * from fluvio_partitions();
64 | ┌───────────┬───────────┬─────────┐
65 | │ topic │ partition │ LEO │
66 | │ varchar │ varchar │ int32 │
67 | ├───────────┼───────────┼─────────┤
68 | │ cat-facts │ 0 │ 30920 │
69 | │ helsinki │ 0 │ 8098386 │
70 | └───────────┴───────────┴─────────┘
71 | ```
72 |
73 | With SQL, you can sum up all the partitions to get total number of offsets.
74 |
75 | ```
76 | D select sum(leo) from fluvio_partitions();
77 | ┌──────────┐
78 | │ sum(leo) │
79 | │ int128 │
80 | ├──────────┤
81 | │ 1859060 │
82 | └──────────┘
83 | ```
84 |
85 | ## Querying Fluvio topics
86 |
87 | With SQL, you can query Fluvio topics and materialize as SQL table.
88 |
89 | The command follow the format:
90 |
91 | ```sql
92 | D select from fluvio_consume(' ');
93 | ```
94 |
95 | The options are same as in the Fluvio CLI except options related to output format.
96 |
97 | For example, to get last 5 events from topic `helsinki`:
98 |
99 | ```sql
100 | D select * from fluvio_consume('helsinki --tail 5');
101 | ┌─────────┬──────────────────────┬────────────────────────────────────────────────────────────────────┐
102 | │ offset │ timestamp │ value │
103 | │ int32 │ timestamp_ms │ varchar │
104 | ├─────────┼──────────────────────┼────────────────────────────────────────────────────────────────────┤
105 | │ 1859053 │ 2023-01-28 23:54:2… │ {"mqtt_topic":"/hfp/v2/journey/ongoing/vp/bus/0018/00258/1065/1/… │
106 | │ 1859054 │ 2023-01-28 23:54:2… │ {"mqtt_topic":"/hfp/v2/journey/ongoing/vp/train/0090/06065/3001T… │
107 | │ 1859055 │ 2023-01-28 23:54:2… │ {"mqtt_topic":"/hfp/v2/journey/ongoing/vp/bus/0022/00971/2118N/2… │
108 | │ 1859056 │ 2023-01-29 00:12:5… │ {"mqtt_topic":"/hfp/v2/journey/ongoing/vp/train/0090/06326/3001T… │
109 | │ 1859057 │ 2023-01-29 00:12:5… │ {"mqtt_topic":"/hfp/v2/journey/ongoing/vp/bus/0022/01360/1085N/2… │
110 | └─────────┴──────────────────────┴────────────────────────────────────────────────────────────────────┘
111 |
112 | ```
113 |
114 | You can ask for help by using `--help` option:
115 |
116 | ```sql
117 | select * from fluvio_consume('--help');
118 | .... help command output
119 | ```
120 |
121 | ## SmartModule Transformations
122 |
123 | You can use SmartModule transformations to transform the data. The transformations are defined in a YAML file. The file is passed to the `--transforms-file` option.
124 |
125 | For example, to get the last 1000 events from topic `helsinki` and transform the data using `jolt.yaml` file:
126 | ```
127 | D select * from fluvio_consume('helsinki --tail 5 --transforms-file=examples/short.yaml');
128 |
129 | select * from fluvio_consume('helsinki --tail 5 --transforms-file=examples/short.yaml');
130 | ┌─────────┬──────────────────────┬────────────────────────────────────────────────────────────────────┐
131 | │ offset │ timestamp │ value │
132 | │ int32 │ timestamp_ms │ varchar │
133 | ├─────────┼──────────────────────┼────────────────────────────────────────────────────────────────────┤
134 | │ 1859053 │ 1969-12-31 23:59:5… │ {"acc":0.0,"desi":"65","dir":"1","dl":-19,"drst":0,"hdg":109,"jr… │
135 | │ 1859054 │ 1969-12-31 23:59:5… │ {"acc":0.15,"desi":"T","dir":"1","dl":-180,"drst":null,"hdg":357… │
136 | │ 1859055 │ 1969-12-31 23:59:5… │ {"acc":-0.56,"desi":"118N","dir":"2","dl":-305,"drst":0,"hdg":17… │
137 | │ 1859056 │ 1969-12-31 23:59:5… │ {"acc":-0.48,"desi":"T","dir":"1","dl":3419,"drst":null,"hdg":18… │
138 | │ 1859057 │ 1969-12-31 23:59:5… │ {"acc":0.0,"desi":"85N","dir":"2","dl":719,"drst":0,"hdg":null,"… │
139 | └─────────┴──────────────────────┴────────────────────────────────────────────────────────────────────┘
140 |
141 | ```
142 |
143 | This assumes you have downloaded jolt SmartModule from the hub. Please see fluvio SmartModule documentation for more information.
144 |
145 | ## Mapping JSON columns to SQL columns
146 |
147 | In the previous example, the JSON data is returned as a single column. You can map the JSON columns to SQL columns using the `-c` option. The `-c` option takes a column name and a JSON path. The JSON path is a dot separated path to the JSON column. For example, to map the `lat` column to `d` column, you can use `-c lat:d="lat"`.
148 |
149 | Following example show how to create materialized view with mapped columns:
150 |
151 | ```
152 | D create view transit as select * from fluvio_consume('helsinki --tail 5 --transforms-file=examples/short.yaml
153 | -c lat:d="lat" -c long:d="long" -c vehicle:i="vehicle" -c route="route" -c speed:d="speed"
154 | -c time:t="tst"');
155 |
156 | D select * from transit;
157 |
158 | ───────────┬───────────┬─────────┬─────────┬────────┬─────────────────────────┐
159 | │ lat │ long │ vehicle │ route │ speed │ time │
160 | │ double │ double │ int32 │ varchar │ double │ timestamp_ms │
161 | ├───────────┼───────────┼─────────┼─────────┼────────┼─────────────────────────┤
162 | │ 60.170393 │ 24.944114 │ 258 │ 1065 │ 5.56 │ 2023-01-28 23:54:23.399 │
163 | │ 60.174296 │ 24.941409 │ 6065 │ 3001T │ 8.75 │ 2023-01-28 23:54:22.629 │
164 | │ 60.172573 │ 24.77937 │ 971 │ 2118N │ 7.36 │ 2023-01-28 23:54:23.39 │
165 | │ 60.171846 │ 24.941544 │ 6326 │ 3001T │ 0.77 │ 2023-01-28 23:54:23.44 │
166 | │ 60.170552 │ 25.079789 │ 1360 │ 1085N │ 0.0 │ 2023-01-28 23:54:23.405 │
167 | └───────────┴───────────┴─────────┴─────────┴────────┴─────────────────────────┘
168 |
169 | ```
170 |
171 | With mapped columns, you can use SQL to perform analysis on the data. For example, to get the average speed of the vehicles by route:
172 |
173 | ```sql
174 | D select route, avg(speed) from transit group by route;
175 | ┌─────────┬────────────┐
176 | │ route │ avg(speed) │
177 | │ varchar │ double │
178 | ├─────────┼────────────┤
179 | │ 1065 │ 5.56 │
180 | │ 3001T │ 4.76 │
181 | │ 2118N │ 7.36 │
182 | │ 1085N │ 0.0 │
183 | └─────────┴────────────┘
184 | ```
185 |
186 | ## Converting fluvio topic data to Parquet
187 |
188 | Previous examples show how to consume data from fluvio topic and perform SQL analysis on the data. You can also convert the data to Parquet format and perform analysis using Parquet tools. For example, to convert the data to Parquet format, you can use the `COPY` command:
189 |
190 | First install Parquet extensions into DuckDB:
191 |
192 | ```
193 | D INSTALL parquet; Load 'parquet';
194 | ```
195 |
196 | Then run the following command to convert the data to Parquet format:
197 |
198 | ```
199 | D COPY (SELECT * FROM ) TO '' (FORMAT 'parquet');
200 | ```
201 | For example, to convert the data from `transit` materialized view to `helsinki.parquet` file, you can run the following command:
202 |
203 | ```
204 | D COPY (SELECT * FROM transit) TO 'helsinki.parquet' (FORMAT 'parquet');
205 | ```
206 |
207 | Note that current version of fluvio-duck extension is not optimized for performance. It is recommended to use the `COPY` command for small data sets.
--------------------------------------------------------------------------------
/bors.toml:
--------------------------------------------------------------------------------
1 | status = [
2 | "Done",
3 | ]
4 | use_squash_merge = true
5 | delete_merged_branches = true
6 | timeout_sec = 3600 # 45 mins
7 |
--------------------------------------------------------------------------------
/examples/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Helsinki Demo
4 |
5 | This demo requires development release of CDK and MQTT connector.
6 |
7 | ## Connect to Fluvio
8 |
9 | Either set up local Fluvio cluster (https://www.fluvio.io) or connect to Infinyon cloud at https://infinyon.cloud/signup.
10 |
11 | Test by running this command:
12 |
13 | ```
14 | $ fluvio topic list
15 | < show topic list>
16 | ```
17 |
18 | ## Download Connector Developer Kit (CDK)
19 |
20 | Download CDK by running this command:
21 |
22 | ```
23 | $ fluvio install --hub cdk
24 | ```
25 |
26 |
27 | # full transformation
28 |
29 |
30 | ```
31 | D create view transit as select * from fluvio_consume('helsinki --tail 10 --transforms-file=jolt.yaml
32 | -c lat:d="lat" -c long:d="long" -c vehicle:i="vehicle" -c route="route" -c speed:d="speed"
33 | -c time:t="tst" -c acc:d="acc" -c line:i="line" -c stop:i="stop" -c desi="desi" -c operator:i="oper"
34 | -c dl:i="dl" -c odo:i="odo" -c drst:i="drst" -c occu:i="occu" -c hdg:i="hdg" -c dir="dir" -c tsi:i="tsi"
35 | -c jrn:i="jrn" -c start="start"');
36 | ```
37 |
38 | All data
39 | ```
40 | D create view transit as select * from fluvio_consume('helsinki -B --rows=1859058 --transforms-file=jolt.yaml
41 | -c lat:d="lat" -c long:d="long" -c vehicle:i="vehicle" -c route="route" -c speed:d="speed"
42 | -c time:t="tst" -c acc:d="acc" -c line:i="line" -c stop:i="stop" -c desi="desi" -c operator:i="oper"
43 | -c dl:i="dl" -c odo:i="odo" -c drst:i="drst" -c occu:i="occu" -c hdg:i="hdg" -c dir="dir" -c tsi:i="tsi"
44 | -c jrn:i="jrn" -c start="start"');
45 | ```
46 |
--------------------------------------------------------------------------------
/examples/jolt.yaml:
--------------------------------------------------------------------------------
1 | transforms:
2 | - uses: infinyon/jolt@0.1.0
3 | with:
4 | spec:
5 | - operation: shift
6 | spec:
7 | payload:
8 | VP:
9 | lat: "lat"
10 | long: "long"
11 | veh: "vehicle"
12 | route: "route"
13 | spd: "speed"
14 | tst: "tst"
--------------------------------------------------------------------------------
/examples/short.yaml:
--------------------------------------------------------------------------------
1 | transforms:
2 | - uses: infinyon/jolt@0.1.0
3 | with:
4 | spec:
5 | - operation: shift
6 | spec:
7 | payload:
8 | VP:
9 | lat: "lat"
10 | long: "long"
11 | veh: "vehicle"
12 | route: "route"
13 | spd: "speed"
14 | tst: "tst"
15 | acc: "acc"
16 | line: "line"
17 | stop: "stop"
18 | desi: "desi"
19 | oper: "oper"
20 | dl: "dl"
21 | odo: "odo"
22 | drst: "drst"
23 | occu: "occu"
24 | hdg: "hdg"
25 | dir: "dir"
26 | tsi: "tsi"
27 | jrn: "jrn"
28 | start: "start"
29 |
--------------------------------------------------------------------------------
/src/bind.rs:
--------------------------------------------------------------------------------
1 | use std::ffi::c_void;
2 | use std::marker::PhantomData;
3 | use std::mem::size_of;
4 | use std::ops::DerefMut;
5 | use std::os::raw::c_char;
6 | use std::ptr::null_mut;
7 | use std::{ffi::CString, ops::Deref};
8 |
9 | use anyhow::{anyhow, Result};
10 | use libduckdb_sys::{
11 | duckdb_bind_add_result_column, duckdb_bind_get_parameter, duckdb_bind_get_parameter_count,
12 | duckdb_bind_info, duckdb_bind_set_bind_data, duckdb_bind_set_error, duckdb_connect,
13 | duckdb_connection, duckdb_create_logical_type, duckdb_create_table_function, duckdb_data_chunk,
14 | duckdb_data_chunk_get_vector, duckdb_data_chunk_set_size, duckdb_database,
15 | duckdb_delete_callback_t, duckdb_destroy_table_function, duckdb_destroy_value,
16 | duckdb_function_get_bind_data, duckdb_function_get_init_data, duckdb_function_info,
17 | duckdb_function_set_error, duckdb_get_int64, duckdb_get_varchar, duckdb_init_get_column_count,
18 | duckdb_init_get_column_index, duckdb_init_info, duckdb_init_set_init_data, duckdb_logical_type,
19 | duckdb_malloc, duckdb_register_table_function, duckdb_table_function,
20 | duckdb_table_function_add_parameter, duckdb_table_function_bind_t,
21 | duckdb_table_function_init_t, duckdb_table_function_set_bind,
22 | duckdb_table_function_set_extra_info, duckdb_table_function_set_function,
23 | duckdb_table_function_set_init, duckdb_table_function_set_name,
24 | duckdb_table_function_supports_projection_pushdown, duckdb_table_function_t, duckdb_value,
25 | duckdb_vector, duckdb_vector_assign_string_element_len, duckdb_vector_get_data,
26 | duckdb_vector_size, idx_t, DuckDBSuccess, DUCKDB_TYPE_DUCKDB_TYPE_BIGINT,
27 | DUCKDB_TYPE_DUCKDB_TYPE_BLOB, DUCKDB_TYPE_DUCKDB_TYPE_BOOLEAN, DUCKDB_TYPE_DUCKDB_TYPE_DATE,
28 | DUCKDB_TYPE_DUCKDB_TYPE_DECIMAL, DUCKDB_TYPE_DUCKDB_TYPE_DOUBLE, DUCKDB_TYPE_DUCKDB_TYPE_ENUM,
29 | DUCKDB_TYPE_DUCKDB_TYPE_FLOAT, DUCKDB_TYPE_DUCKDB_TYPE_HUGEINT,
30 | DUCKDB_TYPE_DUCKDB_TYPE_INTEGER, DUCKDB_TYPE_DUCKDB_TYPE_INTERVAL,
31 | DUCKDB_TYPE_DUCKDB_TYPE_LIST, DUCKDB_TYPE_DUCKDB_TYPE_MAP, DUCKDB_TYPE_DUCKDB_TYPE_SMALLINT,
32 | DUCKDB_TYPE_DUCKDB_TYPE_STRUCT, DUCKDB_TYPE_DUCKDB_TYPE_TIME,
33 | DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP, DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_MS,
34 | DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_NS, DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_S,
35 | DUCKDB_TYPE_DUCKDB_TYPE_TINYINT, DUCKDB_TYPE_DUCKDB_TYPE_UBIGINT,
36 | DUCKDB_TYPE_DUCKDB_TYPE_UINTEGER, DUCKDB_TYPE_DUCKDB_TYPE_UNION,
37 | DUCKDB_TYPE_DUCKDB_TYPE_USMALLINT, DUCKDB_TYPE_DUCKDB_TYPE_UTINYINT,
38 | DUCKDB_TYPE_DUCKDB_TYPE_UUID, DUCKDB_TYPE_DUCKDB_TYPE_VARCHAR,
39 | };
40 |
41 | #[macro_export]
42 | macro_rules! as_string {
43 | ($x:expr) => {
44 | std::ffi::CString::new($x)
45 | .expect("c string")
46 | .as_ptr()
47 | .cast::()
48 | };
49 | }
50 |
51 | pub unsafe fn malloc_struct() -> *mut T {
52 | duckdb_malloc(size_of::()).cast::()
53 | }
54 |
55 | ///
56 | #[derive(Debug)]
57 | pub struct BindInfo(pub(crate) duckdb_bind_info);
58 |
59 | impl BindInfo {
60 | pub fn get_parameter(&self, param_index: u64) -> Value {
61 | unsafe { Value::from(duckdb_bind_get_parameter(self.0, param_index)) }
62 | }
63 |
64 | pub fn add_result_column(&self, column_name: &str, ty: LogicalType) {
65 | unsafe {
66 | duckdb_bind_add_result_column(self.0, as_string!(column_name), *ty);
67 | }
68 | }
69 |
70 | pub fn set_bind_data(&self, data: *mut c_void, free_function: duckdb_delete_callback_t) {
71 | unsafe { duckdb_bind_set_bind_data(self.0, data, free_function) }
72 | }
73 |
74 | pub fn get_parameter_count(&self) -> u64 {
75 | unsafe { duckdb_bind_get_parameter_count(self.0) }
76 | }
77 |
78 | pub fn set_error(&self, error: &str) {
79 | unsafe {
80 | duckdb_bind_set_error(self.0, as_string!(error));
81 | }
82 | }
83 | }
84 |
85 | impl From for BindInfo {
86 | fn from(duck_bind: duckdb_bind_info) -> Self {
87 | Self(duck_bind)
88 | }
89 | }
90 |
91 | pub struct Value(pub(crate) duckdb_value);
92 |
93 | impl Value {
94 | pub fn get_varchar(&self) -> CString {
95 | unsafe { CString::from_raw(duckdb_get_varchar(self.0)) }
96 | }
97 |
98 | #[allow(unused)]
99 | pub fn get_int64(&self) -> i64 {
100 | unsafe { duckdb_get_int64(self.0) }
101 | }
102 | }
103 |
104 | impl From for Value {
105 | fn from(value: duckdb_value) -> Self {
106 | Self(value)
107 | }
108 | }
109 |
110 | impl Drop for Value {
111 | fn drop(&mut self) {
112 | unsafe {
113 | duckdb_destroy_value(&mut self.0);
114 | }
115 | }
116 | }
117 |
118 | #[allow(dead_code)]
119 | #[derive(Debug, Clone)]
120 | #[repr(u32)]
121 | pub enum DuckDBTypeEnum {
122 | Boolean = DUCKDB_TYPE_DUCKDB_TYPE_BOOLEAN,
123 | Tinyint = DUCKDB_TYPE_DUCKDB_TYPE_TINYINT,
124 | Smallint = DUCKDB_TYPE_DUCKDB_TYPE_SMALLINT,
125 | /// Signed 32-bit integer
126 | Integer = DUCKDB_TYPE_DUCKDB_TYPE_INTEGER,
127 | Bigint = DUCKDB_TYPE_DUCKDB_TYPE_BIGINT,
128 | Utinyint = DUCKDB_TYPE_DUCKDB_TYPE_UTINYINT,
129 | Usmallint = DUCKDB_TYPE_DUCKDB_TYPE_USMALLINT,
130 | Uinteger = DUCKDB_TYPE_DUCKDB_TYPE_UINTEGER,
131 | Ubigint = DUCKDB_TYPE_DUCKDB_TYPE_UBIGINT,
132 | Float = DUCKDB_TYPE_DUCKDB_TYPE_FLOAT,
133 | Double = DUCKDB_TYPE_DUCKDB_TYPE_DOUBLE,
134 | Timestamp = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP,
135 | Date = DUCKDB_TYPE_DUCKDB_TYPE_DATE,
136 | Time = DUCKDB_TYPE_DUCKDB_TYPE_TIME,
137 | Interval = DUCKDB_TYPE_DUCKDB_TYPE_INTERVAL,
138 | Hugeint = DUCKDB_TYPE_DUCKDB_TYPE_HUGEINT,
139 | Varchar = DUCKDB_TYPE_DUCKDB_TYPE_VARCHAR,
140 | Blob = DUCKDB_TYPE_DUCKDB_TYPE_BLOB,
141 | Decimal = DUCKDB_TYPE_DUCKDB_TYPE_DECIMAL,
142 | TimestampS = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_S,
143 | TimestampMs = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_MS,
144 | TimestampNs = DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_NS,
145 | Enum = DUCKDB_TYPE_DUCKDB_TYPE_ENUM,
146 | List = DUCKDB_TYPE_DUCKDB_TYPE_LIST,
147 | Struct = DUCKDB_TYPE_DUCKDB_TYPE_STRUCT,
148 | Map = DUCKDB_TYPE_DUCKDB_TYPE_MAP,
149 | Uuid = DUCKDB_TYPE_DUCKDB_TYPE_UUID,
150 | Union = DUCKDB_TYPE_DUCKDB_TYPE_UNION,
151 | }
152 |
153 | pub struct LogicalType(pub(crate) duckdb_logical_type);
154 |
155 | impl Default for LogicalType {
156 | fn default() -> Self {
157 | Self::new(DuckDBTypeEnum::Varchar)
158 | }
159 | }
160 |
161 | impl LogicalType {
162 | pub fn new(typ: DuckDBTypeEnum) -> Self {
163 | unsafe {
164 | Self(duckdb_create_logical_type(
165 | typ as libduckdb_sys::duckdb_type,
166 | ))
167 | }
168 | }
169 | }
170 |
171 | impl Deref for LogicalType {
172 | type Target = duckdb_logical_type;
173 |
174 | fn deref(&self) -> &Self::Target {
175 | &self.0
176 | }
177 | }
178 |
179 | pub struct TableFunction(duckdb_table_function);
180 |
181 | impl TableFunction {
182 | pub fn new() -> Self {
183 | Self(unsafe { duckdb_create_table_function() })
184 | }
185 |
186 | pub fn set_name(&self, name: &str) -> &TableFunction {
187 | unsafe {
188 | let string = CString::from_vec_unchecked(name.as_bytes().into());
189 | duckdb_table_function_set_name(self.0, string.as_ptr());
190 | }
191 | self
192 | }
193 |
194 | pub fn add_parameter(&self, logical_type: &LogicalType) -> &Self {
195 | unsafe {
196 | duckdb_table_function_add_parameter(self.0, **logical_type);
197 | }
198 | self
199 | }
200 |
201 | pub fn set_function(&self, func: duckdb_table_function_t) -> &Self {
202 | unsafe {
203 | duckdb_table_function_set_function(self.0, func);
204 | }
205 | self
206 | }
207 |
208 | pub fn set_init(&self, init_func: duckdb_table_function_init_t) -> &Self {
209 | unsafe {
210 | duckdb_table_function_set_init(self.0, init_func);
211 | }
212 | self
213 | }
214 |
215 | pub fn set_bind(&self, bind_func: duckdb_table_function_bind_t) -> &Self {
216 | unsafe {
217 | duckdb_table_function_set_bind(self.0, bind_func);
218 | }
219 | self
220 | }
221 |
222 | #[allow(dead_code)]
223 | pub fn set_extra_info(&self, extra_info: *mut c_void, destroy: duckdb_delete_callback_t) {
224 | unsafe { duckdb_table_function_set_extra_info(self.0, extra_info, destroy) };
225 | }
226 |
227 | /// set projection
228 | #[allow(unused)]
229 | pub fn set_projection_pushdown(&self, flag: bool) {
230 | unsafe { duckdb_table_function_supports_projection_pushdown(self.0, flag) };
231 | }
232 | }
233 |
234 | impl Deref for TableFunction {
235 | type Target = duckdb_table_function;
236 |
237 | fn deref(&self) -> &Self::Target {
238 | &self.0
239 | }
240 | }
241 |
242 | impl DerefMut for TableFunction {
243 | fn deref_mut(&mut self) -> &mut Self::Target {
244 | &mut self.0
245 | }
246 | }
247 |
248 | impl Drop for TableFunction {
249 | fn drop(&mut self) {
250 | unsafe {
251 | duckdb_destroy_table_function(&mut self.0);
252 | }
253 | }
254 | }
255 |
256 | pub struct Database(duckdb_database);
257 |
258 | impl From for Database {
259 | fn from(db: duckdb_database) -> Self {
260 | Self(db)
261 | }
262 | }
263 |
264 | impl Database {
265 | pub fn connect(&self) -> Result {
266 | let mut connection: duckdb_connection = null_mut();
267 |
268 | unsafe {
269 | if duckdb_connect(self.0, &mut connection) != DuckDBSuccess {
270 | return Err(anyhow!("Failed to connect to database"));
271 | }
272 | }
273 |
274 | Ok(Connection::from(connection))
275 | }
276 | }
277 |
278 | pub struct Connection(duckdb_connection);
279 |
280 | impl From for Connection {
281 | fn from(connection: duckdb_connection) -> Self {
282 | Self(connection)
283 | }
284 | }
285 |
286 | impl Connection {
287 | pub fn register_table_function(&self, table_function: TableFunction) -> Result<()> {
288 | unsafe {
289 | if duckdb_register_table_function(self.0, *table_function) != DuckDBSuccess {
290 | return Err(anyhow!("Failed to register table function"));
291 | }
292 | }
293 | Ok(())
294 | }
295 | }
296 |
297 | pub struct FunctionInfo(duckdb_function_info);
298 |
299 | impl From for FunctionInfo {
300 | fn from(info: duckdb_function_info) -> Self {
301 | Self(info)
302 | }
303 | }
304 |
305 | impl FunctionInfo {
306 | pub fn get_bind_data(&self) -> *mut T {
307 | unsafe { duckdb_function_get_bind_data(self.0).cast() }
308 | }
309 |
310 | pub fn get_init_data(&self) -> *mut T {
311 | unsafe { duckdb_function_get_init_data(self.0).cast() }
312 | }
313 |
314 | pub fn set_error(&self, error: &str) {
315 | unsafe {
316 | duckdb_function_set_error(self.0, as_string!(error));
317 | }
318 | }
319 | }
320 |
321 | pub struct InitInfo(duckdb_init_info);
322 | impl From for InitInfo {
323 | fn from(info: duckdb_init_info) -> Self {
324 | Self(info)
325 | }
326 | }
327 |
328 | impl InitInfo {
329 | pub fn set_init_data(&self, data: *mut c_void, freeer: duckdb_delete_callback_t) {
330 | unsafe { duckdb_init_set_init_data(self.0, data, freeer) };
331 | }
332 |
333 | pub fn column_count(&self) -> idx_t {
334 | unsafe { duckdb_init_get_column_count(self.0) }
335 | }
336 |
337 | pub fn projected_column_index(&self, column_index: idx_t) -> idx_t {
338 | unsafe { duckdb_init_get_column_index(self.0, column_index) }
339 | }
340 | }
341 |
342 | pub struct DataChunk(duckdb_data_chunk);
343 |
344 | impl From for DataChunk {
345 | fn from(chunk: duckdb_data_chunk) -> Self {
346 | Self(chunk)
347 | }
348 | }
349 |
350 | impl DataChunk {
351 | pub fn get_vector(&self, column_index: idx_t) -> Vector {
352 | Vector::from(unsafe { duckdb_data_chunk_get_vector(self.0, column_index) })
353 | }
354 |
355 | pub fn set_size(&self, size: idx_t) {
356 | unsafe { duckdb_data_chunk_set_size(self.0, size) };
357 | }
358 | }
359 |
360 | pub struct Vector {
361 | duck_ptr: duckdb_vector,
362 | _phantom: PhantomData,
363 | }
364 |
365 | impl From for Vector {
366 | fn from(duck_ptr: duckdb_vector) -> Self {
367 | Self {
368 | duck_ptr,
369 | _phantom: PhantomData,
370 | }
371 | }
372 | }
373 |
374 | impl Vector {
375 | /// set data
376 | pub fn set_data(&self, row: usize, data: T) {
377 | let data_ptr: *mut T = unsafe { duckdb_vector_get_data(self.duck_ptr).cast() };
378 | let data_slice: &mut [T] =
379 | unsafe { std::slice::from_raw_parts_mut(data_ptr, duckdb_vector_size() as usize) };
380 | data_slice[row] = data;
381 | }
382 | }
383 |
384 | impl Vector<&[u8]> {
385 | pub fn assign_string_element(&self, index: idx_t, str: &[u8]) {
386 | unsafe {
387 | duckdb_vector_assign_string_element_len(
388 | self.duck_ptr,
389 | index,
390 | str.as_ptr() as *const c_char,
391 | str.len() as idx_t,
392 | )
393 | }
394 | }
395 | }
396 |
--------------------------------------------------------------------------------
/src/consume.rs:
--------------------------------------------------------------------------------
1 | use std::boxed::Box;
2 | use std::ffi::c_void;
3 | use std::pin::Pin;
4 |
5 | use anyhow::{anyhow, Result};
6 | use chrono::DateTime;
7 | use futures_lite::{Stream, StreamExt};
8 | use tracing::{debug, error, trace};
9 |
10 | use jql::walker;
11 | use libduckdb_sys::{
12 | duckdb_bind_info, duckdb_data_chunk, duckdb_free, duckdb_function_info, duckdb_init_info,
13 | duckdb_vector_size, idx_t,
14 | };
15 |
16 | use fluvio::consumer::Record;
17 | use fluvio::dataplane::link::ErrorCode;
18 | use fluvio::{ConsumerConfig, PartitionConsumer};
19 | use fluvio_future::task::run_block_on;
20 | use serde_json::Value;
21 |
22 | use crate::bind::{
23 | malloc_struct, BindInfo, DataChunk, DuckDBTypeEnum, FunctionInfo, InitInfo, LogicalType,
24 | TableFunction,
25 | };
26 |
27 | pub fn fluvio_consumer_table_function_def() -> TableFunction {
28 | let table_function = TableFunction::new();
29 | table_function.set_name("fluvio_consume");
30 |
31 | // first parameter is topic name
32 | table_function.add_parameter(&LogicalType::new(DuckDBTypeEnum::Varchar));
33 | // second paramter is offset
34 | // table_function.add_parameter(&LogicalType::new(DuckDBTypeEnum::Bigint));
35 | //third paramter is count
36 | // table_function.add_parameter(&LogicalType::new(DuckDBTypeEnum::Bigint));
37 |
38 | table_function.set_function(Some(consumer_read));
39 | table_function.set_init(Some(consume_init));
40 | table_function.set_bind(Some(consumer_bind));
41 | // table_function.set_projection_pushdown(true);
42 | table_function
43 | }
44 |
45 | type PartitionConsumerIteratorInner = Pin> + Send>>;
46 |
47 | struct FluvioBindInner {
48 | consumer_stream: PartitionConsumerIteratorInner,
49 | _consumer: Box,
50 | max_row_count: u64,
51 | columns: Vec,
52 | }
53 |
54 | #[repr(C)]
55 | struct FluvioBindDataStruct(*mut FluvioBindInner);
56 |
57 | #[repr(C)]
58 | struct FluvioInitDataStruct {
59 | total_row: u64,
60 | }
61 |
62 | /// read data from fluvio
63 | #[no_mangle]
64 | unsafe extern "C" fn consumer_read(info: duckdb_function_info, chunk: duckdb_data_chunk) {
65 | let info = FunctionInfo::from(info);
66 | let output = DataChunk::from(chunk);
67 | if let Err(err) = internal_read(&info, &output) {
68 | info.set_error(&err.to_string());
69 | }
70 | }
71 |
72 | unsafe fn internal_read(info: &FunctionInfo, output: &DataChunk) -> Result<()> {
73 | let bind_data = info.get_bind_data::();
74 | let inner = &mut *(*bind_data).0;
75 | let max_row_count = inner.max_row_count;
76 | let mut init_data = info.get_init_data::();
77 |
78 | // current accumulated total
79 | let mut accum_total = (*init_data).total_row;
80 | if accum_total >= max_row_count {
81 | debug!(accum_total, "done, max row reached");
82 | output.set_size(0);
83 | return Ok(());
84 | }
85 |
86 | let max_len = duckdb_vector_size() as usize;
87 | let mut row: usize = 0;
88 | loop {
89 | debug!("row: {}", row);
90 | // if exceed max row or max duckdb len
91 | if accum_total >= max_row_count || row >= max_len {
92 | output.set_size(row as u64);
93 | (*init_data).total_row = accum_total;
94 | break;
95 | } else {
96 | let mut stream = inner.consumer_stream.as_mut();
97 | debug!("waiting for data from fluvio");
98 | // get first data from fluvio
99 | let record_output = run_block_on(async { stream.next().await });
100 |
101 | let record = match record_output {
102 | Some(record) => record?,
103 | None => {
104 | debug!("no more records");
105 | output.set_size(row as u64);
106 | (*init_data).total_row = max_row_count; // set to max so we can terminate
107 | break;
108 | }
109 | };
110 |
111 | let offset = record.offset();
112 | debug!(offset, "retrieved record offset");
113 | trace!(
114 | "offset: {offset}, value: {:?}",
115 | std::str::from_utf8(record.value()).unwrap()
116 | );
117 |
118 | for (column_index, column) in inner.columns.iter().enumerate() {
119 | if let Err(err) =
120 | column
121 | .mapping
122 | .map(&record, column_index as u64, row, output, &column.ty)
123 | {
124 | info.set_error(&err.to_string());
125 | }
126 | }
127 |
128 | row += 1;
129 | accum_total += 1;
130 | }
131 | }
132 |
133 | Ok(())
134 | }
135 |
136 | #[no_mangle]
137 | unsafe extern "C" fn consume_init(info: duckdb_init_info) {
138 | let info = InitInfo::from(info);
139 |
140 | let _column_count = info.column_count();
141 | //println!("columt count: {}", column_count);
142 |
143 | let _colum_1 = info.projected_column_index(0);
144 | //println!("projected column: {}", colum_1);
145 |
146 | let mut my_init_data = malloc_struct::();
147 | (*my_init_data).total_row = 0;
148 | info.set_init_data(my_init_data.cast(), Some(duckdb_free));
149 | debug!("consumer init done");
150 | }
151 |
152 | const PARM_TOPIC_NAME: u64 = 0;
153 | //const PARM_START_OFFSET: u64 = 1;
154 | //const PARM_FETCH_COUNT: u64 = 2;
155 |
156 | /// set up duck db table columns
157 | #[no_mangle]
158 | unsafe extern "C" fn consumer_bind(bind_ptr: duckdb_bind_info) {
159 | let bind_info = BindInfo::from(bind_ptr);
160 | if let Err(err) = internal_bind(&bind_info) {
161 | bind_info.set_error(&err.to_string());
162 | }
163 | }
164 |
165 | unsafe fn internal_bind(bind_info: &BindInfo) -> Result<()> {
166 | let param_count = bind_info.get_parameter_count();
167 | // we need at least one parameter
168 | assert_eq!(param_count, PARM_TOPIC_NAME + 1);
169 |
170 | let topic_param = bind_info.get_parameter(PARM_TOPIC_NAME);
171 | let ptr = topic_param.get_varchar();
172 | let cmd_args = ptr.to_str()?;
173 |
174 | let consumer_opt = opt::ConsumeOpt::parse_from_string(cmd_args)?;
175 | let config = consumer_opt.generate_config()?;
176 | let start_offset = consumer_opt.calculate_offset()?;
177 |
178 | let topic = consumer_opt.topic.clone();
179 | let consumer = run_block_on(async { fluvio::consumer(topic, 0).await })?;
180 | let boxed_consumer = Box::new(consumer);
181 | debug!("consumer created");
182 |
183 | // add offset column which is integer
184 | let columns = consumer_opt.columns_mappings();
185 | for column in columns.iter() {
186 | bind_info.add_result_column(&column.name, LogicalType::new(column.ty.clone()));
187 | }
188 |
189 | let consumer_stream = run_block_on(async {
190 | boxed_consumer
191 | .stream_with_config(start_offset, config)
192 | .await
193 | })?;
194 |
195 | let boxed_stream = consumer_stream.boxed();
196 | // println!("consumer stream created");
197 | let bind_inner = Box::new(FluvioBindInner {
198 | consumer_stream: boxed_stream,
199 | _consumer: boxed_consumer,
200 | max_row_count: consumer_opt.rows as u64,
201 | columns,
202 | });
203 |
204 | let my_bind_data = malloc_struct::();
205 | (*my_bind_data).0 = Box::into_raw(bind_inner);
206 | bind_info.set_bind_data(my_bind_data.cast(), Some(drop_my_bind_data_struct));
207 | debug!("bind done");
208 |
209 | Ok(())
210 | }
211 |
212 | unsafe extern "C" fn drop_my_bind_data_struct(v: *mut c_void) {
213 | // let actual = v.cast::();
214 | duckdb_free(v);
215 | }
216 |
217 | pub(crate) struct ColumnMapping {
218 | pub(crate) name: String,
219 | pub(crate) mapping: Box,
220 | pub(crate) ty: DuckDBTypeEnum,
221 | }
222 |
223 | impl ColumnMapping {
224 | /// create new mapping for column,
225 | pub(crate) fn new(name_ty: String, mapping: Box) -> Self {
226 | // check if name contains type
227 | let mut parts = name_ty.split(':');
228 | let name = parts.next().unwrap().to_string(); // always name
229 | let ty = if let Some(ty_string) = parts.next() {
230 | match ty_string {
231 | "i" => DuckDBTypeEnum::Integer,
232 | "l" => DuckDBTypeEnum::Uinteger,
233 | "f" => DuckDBTypeEnum::Float,
234 | "d" => DuckDBTypeEnum::Double,
235 | "s" => DuckDBTypeEnum::Varchar,
236 | "t" => DuckDBTypeEnum::TimestampMs,
237 | _ => DuckDBTypeEnum::Varchar,
238 | }
239 | } else {
240 | DuckDBTypeEnum::Varchar
241 | };
242 |
243 | Self { name, mapping, ty }
244 | }
245 | }
246 |
247 | /// map record to string
248 | pub(crate) trait MappingTrait {
249 | // map record to chunk for column
250 | fn map(
251 | &self,
252 | record: &Record,
253 | colum: idx_t,
254 | row: usize,
255 | output: &DataChunk,
256 | ty: &DuckDBTypeEnum,
257 | ) -> Result<()>;
258 | }
259 |
260 | struct OffsetMapper();
261 |
262 | impl MappingTrait for OffsetMapper {
263 | fn map(
264 | &self,
265 | record: &Record,
266 | colum: idx_t,
267 | row: usize,
268 | output: &DataChunk,
269 | _ty: &DuckDBTypeEnum,
270 | ) -> Result<()> {
271 | let offset_vector = output.get_vector(colum);
272 | offset_vector.set_data(row, record.offset() as u32);
273 | Ok(())
274 | }
275 | }
276 |
277 | struct TimestampMapper();
278 |
279 | impl MappingTrait for TimestampMapper {
280 | fn map(
281 | &self,
282 | record: &Record,
283 | colum: idx_t,
284 | row: usize,
285 | output: &DataChunk,
286 | _ty: &DuckDBTypeEnum,
287 | ) -> Result<()> {
288 | let timestamp_vector = output.get_vector(colum);
289 | timestamp_vector.set_data(row, record.timestamp() as u64);
290 | Ok(())
291 | }
292 | }
293 |
294 | struct ValueMapper();
295 |
296 | impl MappingTrait for ValueMapper {
297 | fn map(
298 | &self,
299 | record: &Record,
300 | colum: idx_t,
301 | row: usize,
302 | output: &DataChunk,
303 | _ty: &DuckDBTypeEnum,
304 | ) -> Result<()> {
305 | let value_vector = output.get_vector(colum);
306 | value_vector.assign_string_element(row as idx_t, record.value());
307 | Ok(())
308 | }
309 | }
310 |
311 | struct JqlMapper(String);
312 |
313 | impl JqlMapper {
314 | pub(crate) fn new(jql: String) -> Self {
315 | Self(jql)
316 | }
317 | }
318 |
319 | impl MappingTrait for JqlMapper {
320 | fn map(
321 | &self,
322 | record: &Record,
323 | colum: idx_t,
324 | row: usize,
325 | output: &DataChunk,
326 | ty: &DuckDBTypeEnum,
327 | ) -> Result<()> {
328 | let v: Value = serde_json::from_slice(record.value())?;
329 | let find_value = match walker(&v, &self.0) {
330 | Ok(value) => value,
331 | Err(err) => {
332 | let value_vector = output.get_vector(colum);
333 | value_vector.assign_string_element(row as idx_t, err.as_bytes());
334 | return Ok(());
335 | }
336 | };
337 |
338 | match find_value {
339 | Value::String(s) => {
340 | debug!("string: {}", s);
341 | match ty {
342 | DuckDBTypeEnum::TimestampMs => {
343 | // 2023-01-28T23:54:23.405Z
344 | let value_vector = output.get_vector(colum);
345 | // parse timestamp
346 | match DateTime::parse_from_rfc3339(&s) {
347 | Ok(dt) => {
348 | let timestamp = dt.timestamp_millis();
349 | value_vector.set_data(row, timestamp as u64);
350 | }
351 | Err(err) => {
352 | error!("error parsing timestamp: {}", err);
353 | }
354 | }
355 | }
356 | _ => {
357 | let value_vector = output.get_vector(colum);
358 | value_vector.assign_string_element(row as idx_t, s.as_bytes());
359 | }
360 | }
361 | }
362 | Value::Number(n) => {
363 | debug!("number: {}", n);
364 | match ty {
365 | DuckDBTypeEnum::Integer => {
366 | if let Some(i) = n.as_i64() {
367 | let val = i as i32;
368 | let value_vector = output.get_vector(colum);
369 | value_vector.set_data(row, val);
370 | }
371 | }
372 | DuckDBTypeEnum::Uinteger => {
373 | if let Some(i) = n.as_i64() {
374 | let val = i as u64;
375 | let value_vector = output.get_vector(colum);
376 | value_vector.set_data(row, val);
377 | }
378 | }
379 | DuckDBTypeEnum::Float => {
380 | if let Some(f) = n.as_f64() {
381 | let val = f as f32;
382 | let value_vector = output.get_vector(colum);
383 | value_vector.set_data(row, val);
384 | }
385 | }
386 | DuckDBTypeEnum::Double => {
387 | if let Some(val) = n.as_f64() {
388 | let value_vector = output.get_vector(colum);
389 | value_vector.set_data(row, val);
390 | }
391 | }
392 | _ => {
393 | debug!("ignore number: {}", n);
394 | }
395 | }
396 | }
397 | Value::Bool(b) => {
398 | debug!("bool: {}", b);
399 | let value_vector = output.get_vector(colum);
400 | value_vector.set_data(row, b as u8);
401 | }
402 | Value::Null => {
403 | debug!("null value");
404 | match ty {
405 | DuckDBTypeEnum::Integer => {
406 | let value_vector = output.get_vector(colum);
407 | value_vector.set_data(row, 0_i32);
408 | }
409 | DuckDBTypeEnum::Uinteger => {
410 | let value_vector = output.get_vector(colum);
411 | value_vector.set_data(row, 0_i64);
412 | }
413 | DuckDBTypeEnum::Float => {
414 | let value_vector = output.get_vector(colum);
415 | value_vector.set_data(row, 0 as f64);
416 | }
417 | DuckDBTypeEnum::Double => {
418 | let value_vector = output.get_vector(colum);
419 | value_vector.set_data(row, 0 as f64);
420 | }
421 | DuckDBTypeEnum::Varchar => {
422 | let value_vector = output.get_vector(colum);
423 | let string = "null";
424 | value_vector.assign_string_element(row as idx_t, string.as_bytes());
425 | }
426 | _ => {}
427 | }
428 | }
429 | Value::Object(_) => {
430 | debug!("object: {:?}", find_value);
431 | let value_vector = output.get_vector(colum);
432 | value_vector.assign_string_element(row as idx_t, find_value.to_string().as_bytes());
433 | }
434 | _ => {
435 | debug!("other: {:?}", find_value);
436 | let value_vector = output.get_vector(colum);
437 | value_vector.assign_string_element(row as idx_t, find_value.to_string().as_bytes());
438 | }
439 | }
440 |
441 | Ok(())
442 | }
443 | }
444 |
445 | mod opt {
446 |
447 | use std::{collections::BTreeMap, path::PathBuf};
448 |
449 | use clap::Parser;
450 |
451 | use fluvio::{
452 | FluvioError, Isolation, Offset, SmartModuleContextData, SmartModuleInvocation,
453 | SmartModuleInvocationWasm, SmartModuleKind,
454 | };
455 | use fluvio_future::tracing::debug;
456 | use fluvio_smartengine::transformation::TransformationConfig;
457 | use fluvio_types::PartitionId;
458 |
459 | use super::*;
460 |
461 | /// copy from Fluvio CLI
462 | ///
463 | /// By default, consume operates in "streaming" mode, where the command will remain
464 | /// active and wait for new messages, printing them as they arrive. You can use the
465 | /// '-d' flag to exit after consuming all available messages.
466 | #[derive(Debug, Parser)]
467 | pub struct ConsumeOpt {
468 | /// Topic name
469 | #[clap(value_name = "topic")]
470 | pub topic: String,
471 |
472 | /// Partition id
473 | #[clap(short = 'p', long, default_value = "0", value_name = "integer")]
474 | pub partition: PartitionId,
475 |
476 | /// Consume records from all partitions
477 | #[clap(short = 'A', long = "all-partitions", conflicts_with_all = &["partition"])]
478 | pub all_partitions: bool,
479 |
480 | /// Disable continuous processing of messages
481 | #[clap(short = 'd', long)]
482 | pub enable_continuous: bool,
483 |
484 | /// Consume records from the beginning of the log
485 | #[clap(short = 'B', long, conflicts_with_all = &["head","start", "tail"])]
486 | pub beginning: bool,
487 |
488 | /// Consume records starting from the beginning of the log
489 | #[clap(short = 'H', long, value_name = "integer", conflicts_with_all = &["beginning", "start", "tail"])]
490 | pub head: Option,
491 |
492 | /// Consume records starting from the end of the log
493 | #[clap(short = 'T', long, value_name = "integer", conflicts_with_all = &["beginning","head", "start"])]
494 | pub tail: Option,
495 |
496 | /// The absolute offset of the first record to begin consuming from
497 | #[clap(long, value_name = "integer", conflicts_with_all = &["beginning", "head", "tail"])]
498 | pub start: Option,
499 |
500 | #[clap(long, default_value = "1000")]
501 | pub rows: u32,
502 |
503 | /// Consume records until end offset (inclusive)
504 | #[clap(long, value_name = "integer")]
505 | pub end: Option,
506 |
507 | /// Maximum number of bytes to be retrieved
508 | #[clap(short = 'b', long = "maxbytes", value_name = "integer")]
509 | pub max_bytes: Option,
510 |
511 | /// (Optional) Path to a file to use as an initial accumulator value with --aggregate
512 | #[clap(long, requires = "aggregate_group", alias = "a-init")]
513 | pub aggregate_initial: Option,
514 |
515 | /// (Optional) Extra input parameters passed to the smartmodule module.
516 | /// They should be passed using key=value format
517 | /// Eg. fluvio consume topic-name --filter filter.wasm -e foo=bar -e key=value -e one=1
518 | #[clap(
519 | short = 'e',
520 | requires = "smartmodule_group",
521 | long="params",
522 | value_parser=parse_key_val,
523 | // value_parser,
524 | // action,
525 | number_of_values = 1
526 | )]
527 | pub params: Option>,
528 |
529 | /// Isolation level that consumer must respect.
530 | /// Supported values: read_committed (ReadCommitted) - consume only committed records,
531 | /// read_uncommitted (ReadUncommitted) - consume all records accepted by leader.
532 | #[clap(long, value_parser=parse_isolation)]
533 | pub isolation: Option,
534 |
535 | /// Name of the smartmodule
536 | #[clap(
537 | long,
538 | group("smartmodule_group"),
539 | group("aggregate_group"),
540 | alias = "sm"
541 | )]
542 | pub smartmodule: Option,
543 |
544 | /// Path to the smart module
545 | #[clap(
546 | long,
547 | group("smartmodule_group"),
548 | group("aggregate_group"),
549 | alias = "sm_path"
550 | )]
551 | pub smartmodule_path: Option,
552 |
553 | /// (Optional) Path to a file with transformation specification.
554 | #[clap(long, conflicts_with = "smartmodule_group")]
555 | pub transforms_file: Option,
556 |
557 | /// (Optional) Transformation specification as JSON formatted string.
558 | /// E.g. fluvio consume topic-name --transform='{"uses":"infinyon/jolt@0.1.0","with":{"spec":"[{\"operation\":\"default\",\"spec\":{\"source\":\"test\"}}]"}}'
559 | #[clap(long, short, conflicts_with_all = &["smartmodule_group", "transforms_file"])]
560 | pub transform: Vec,
561 |
562 | /// column mapping, this will map to duckdb columns, if this not specific, then default column (key,timestamp, value)
563 | /// this assume values json format
564 | /// Eg. -c ph=contact.ph -c addr=contact.addr -e
565 | #[clap(
566 | short = 'c',
567 | long,
568 | value_parser=parse_key_val,
569 | )]
570 | pub columns: Vec<(String, String)>,
571 | }
572 |
573 | impl ConsumeOpt {
574 | pub fn parse_from_string(input: &str) -> Result {
575 | let wrapper = format!("ConsumeOpt {input}");
576 | let args = wrapper.split_whitespace();
577 | ConsumeOpt::try_parse_from(args).map_err(|err| err.into())
578 | }
579 |
580 | pub fn calculate_offset(&self) -> Result {
581 | if let Some(end_offset) = self.end {
582 | if let Some(start_offset) = self.start {
583 | if end_offset < start_offset {
584 | eprintln!(
585 | "Argument end-offset must be greater than or equal to specified start offset"
586 | );
587 | return Err(FluvioError::CrossingOffsets(start_offset, end_offset).into());
588 | }
589 | }
590 | }
591 |
592 | let offset = if self.beginning {
593 | Offset::from_beginning(0)
594 | } else if let Some(offset) = self.head {
595 | Offset::from_beginning(offset)
596 | } else if let Some(offset) = self.start {
597 | Offset::absolute(offset as i64).unwrap()
598 | } else if let Some(offset) = self.tail {
599 | Offset::from_end(offset)
600 | } else {
601 | Offset::end()
602 | };
603 |
604 | Ok(offset)
605 | }
606 |
607 | pub(crate) fn columns_mappings(&self) -> Vec {
608 | let columns: Vec = self
609 | .columns
610 | .iter()
611 | .map(|(name, json_map)| {
612 | ColumnMapping::new(name.clone(), Box::new(JqlMapper::new(json_map.clone())))
613 | })
614 | .collect();
615 |
616 | if columns.is_empty() {
617 | vec![
618 | ColumnMapping {
619 | name: "offset".to_owned(),
620 | mapping: Box::new(OffsetMapper()),
621 | ty: DuckDBTypeEnum::Integer,
622 | },
623 | ColumnMapping {
624 | name: "timestamp".to_owned(),
625 | mapping: Box::new(TimestampMapper()),
626 | ty: DuckDBTypeEnum::TimestampMs,
627 | },
628 | ColumnMapping {
629 | name: "value".to_string(),
630 | mapping: Box::new(ValueMapper()),
631 | ty: DuckDBTypeEnum::Varchar,
632 | },
633 | ]
634 | } else {
635 | columns
636 | }
637 | }
638 |
639 | pub fn generate_config(&self) -> Result {
640 | let mut builder = ConsumerConfig::builder();
641 | if let Some(max_bytes) = self.max_bytes {
642 | builder.max_bytes(max_bytes);
643 | }
644 |
645 | let initial_param = match &self.params {
646 | None => BTreeMap::default(),
647 | Some(params) => params.clone().into_iter().collect(),
648 | };
649 |
650 | let smart_module = if let Some(smart_module_name) = &self.smartmodule {
651 | vec![create_smartmodule(
652 | smart_module_name,
653 | self.smart_module_ctx(),
654 | initial_param,
655 | )]
656 | } else if !self.transform.is_empty() {
657 | let config =
658 | TransformationConfig::try_from(self.transform.clone()).map_err(|err| {
659 | anyhow!(format!("unable to parse `transform` argument: {err}"))
660 | })?;
661 | create_smartmodule_list(config)?
662 | } else if let Some(transforms_file) = &self.transforms_file {
663 | let config = TransformationConfig::from_file(transforms_file).map_err(|err| {
664 | anyhow!(format!(
665 | "unable to process `transforms_file` argument: {err}"
666 | ))
667 | })?;
668 | create_smartmodule_list(config)?
669 | } else {
670 | Vec::new()
671 | };
672 |
673 | builder.smartmodule(smart_module);
674 |
675 | builder.disable_continuous(!self.enable_continuous);
676 |
677 | if let Some(isolation) = self.isolation {
678 | builder.isolation(isolation);
679 | }
680 |
681 | let consume_config = builder.build()?;
682 | debug!("consume config: {:#?}", consume_config);
683 |
684 | Ok(consume_config)
685 | }
686 |
687 | fn smart_module_ctx(&self) -> SmartModuleContextData {
688 | if let Some(agg_initial) = &self.aggregate_initial {
689 | SmartModuleContextData::Aggregate {
690 | accumulator: agg_initial.clone().into_bytes(),
691 | }
692 | } else {
693 | SmartModuleContextData::None
694 | }
695 | }
696 | }
697 |
698 | fn parse_key_val(s: &str) -> Result<(String, String)> {
699 | let pos = s
700 | .find('=')
701 | .ok_or_else(|| anyhow!(format!("invalid KEY=value: no `=` found in `{s}`")))?;
702 | Ok((s[..pos].parse()?, s[pos + 1..].parse()?))
703 | }
704 |
705 | pub(crate) fn parse_isolation(s: &str) -> Result {
706 | match s {
707 | "read_committed" | "ReadCommitted" | "readCommitted" | "readcommitted" => Ok(Isolation::ReadCommitted),
708 | "read_uncommitted" | "ReadUncommitted" | "readUncommitted" | "readuncommitted" => Ok(Isolation::ReadUncommitted),
709 | _ => Err(format!("unrecognized isolation: {s}. Supported: read_committed (ReadCommitted), read_uncommitted (ReadUncommitted)")),
710 | }
711 | }
712 |
713 | fn create_smartmodule(
714 | name: &str,
715 | ctx: SmartModuleContextData,
716 | params: BTreeMap,
717 | ) -> SmartModuleInvocation {
718 | SmartModuleInvocation {
719 | wasm: SmartModuleInvocationWasm::Predefined(name.to_string()),
720 | kind: SmartModuleKind::Generic(ctx),
721 | params: params.into(),
722 | }
723 | }
724 |
725 | /// create list of smartmodules from a list of transformations
726 | fn create_smartmodule_list(config: TransformationConfig) -> Result> {
727 | Ok(config
728 | .transforms
729 | .into_iter()
730 | .map(|t| SmartModuleInvocation {
731 | wasm: SmartModuleInvocationWasm::Predefined(t.uses),
732 | kind: SmartModuleKind::Generic(Default::default()),
733 | params: t
734 | .with
735 | .into_iter()
736 | .map(|(k, v)| (k, v.into()))
737 | .collect::>()
738 | .into(),
739 | })
740 | .collect())
741 | }
742 | }
743 |
--------------------------------------------------------------------------------
/src/lib.rs:
--------------------------------------------------------------------------------
1 | mod bind;
2 | mod consume;
3 | mod partition;
4 | mod topic;
5 |
6 | mod top {
7 | use std::ffi::c_char;
8 |
9 | use anyhow::Result;
10 | use libduckdb_sys::{duckdb_database, duckdb_library_version};
11 | use tracing::info;
12 |
13 | use crate::{
14 | bind::Database, partition::fluvio_admin_partition_function_def,
15 | topic::fluvio_admin_topic_function_def,
16 | };
17 |
18 | use super::consume::fluvio_consumer_table_function_def;
19 |
20 | #[no_mangle]
21 | pub unsafe extern "C" fn fluvioduck_init_rust(db: duckdb_database) {
22 | fluvio_future::subscriber::init_tracer(None);
23 | info!("init");
24 | init(db).expect("init failed");
25 | // do nothing
26 | }
27 |
28 | #[no_mangle]
29 | pub extern "C" fn fluvioduck_version_rust() -> *const c_char {
30 | unsafe { duckdb_library_version() }
31 | }
32 |
33 | fn init(db: duckdb_database) -> Result<()> {
34 | fluvio_future::subscriber::init_tracer(None);
35 | let db = Database::from(db);
36 | let connection = db.connect()?;
37 | connection.register_table_function(fluvio_consumer_table_function_def())?;
38 | connection.register_table_function(fluvio_admin_topic_function_def())?;
39 | connection.register_table_function(fluvio_admin_partition_function_def())?;
40 | Ok(())
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/partition.rs:
--------------------------------------------------------------------------------
1 | use std::boxed::Box;
2 | use std::ffi::c_void;
3 |
4 | use anyhow::Result;
5 | use libduckdb_sys::{
6 | duckdb_bind_info, duckdb_data_chunk, duckdb_free, duckdb_function_info, duckdb_init_info,
7 | };
8 | use tracing::debug;
9 |
10 | use fluvio::dataplane::record::PartitionError;
11 | use fluvio::metadata::partition::{PartitionSpec, ReplicaKey};
12 |
13 | use fluvio::{Fluvio, FluvioAdmin};
14 | use fluvio_future::task::run_block_on;
15 |
16 | use crate::bind::{
17 | malloc_struct, BindInfo, DataChunk, DuckDBTypeEnum, FunctionInfo, InitInfo, LogicalType,
18 | TableFunction,
19 | };
20 |
21 | pub fn fluvio_admin_partition_function_def() -> TableFunction {
22 | let table_function = TableFunction::new();
23 | table_function.set_name("fluvio_partitions");
24 |
25 | table_function.set_function(Some(partition_read));
26 | table_function.set_init(Some(partition_init));
27 | table_function.set_bind(Some(partition_bind));
28 | table_function
29 | }
30 |
31 | struct FluvioAdminInner {
32 | admin: Box,
33 | }
34 |
35 | #[repr(C)]
36 | struct TopicBindDataStruct(*mut FluvioAdminInner);
37 |
38 | #[repr(C)]
39 | struct TopicInitDataStruct {
40 | done: bool,
41 | }
42 |
43 | #[no_mangle]
44 | unsafe extern "C" fn partition_bind(bind_ptr: duckdb_bind_info) {
45 | let bind_info = BindInfo::from(bind_ptr);
46 | if let Err(err) = internal_bind(&bind_info) {
47 | bind_info.set_error(&err.to_string());
48 | }
49 | }
50 |
51 | unsafe fn internal_bind(bind_info: &BindInfo) -> Result<()> {
52 | bind_info.add_result_column("topic", LogicalType::new(DuckDBTypeEnum::Varchar));
53 | bind_info.add_result_column("partition", LogicalType::new(DuckDBTypeEnum::Varchar));
54 | bind_info.add_result_column("LEO", LogicalType::new(DuckDBTypeEnum::Integer));
55 | // bind_info.add_result_column("SIZE", LogicalType::new(DuckDBTypeEnum::Integer));
56 |
57 | let admin = run_block_on(async {
58 | let fluvio = Fluvio::connect().await?;
59 | let admin = fluvio.admin().await;
60 | Ok(admin) as Result
61 | })?;
62 |
63 | let boxed_admin = Box::new(admin);
64 | debug!("amin created");
65 | let bind_inner = Box::new(FluvioAdminInner { admin: boxed_admin });
66 |
67 | let my_bind_data = malloc_struct::();
68 | (*my_bind_data).0 = Box::into_raw(bind_inner);
69 | bind_info.set_bind_data(my_bind_data.cast(), Some(drop_my_bind_data_struct));
70 |
71 | Ok(())
72 | }
73 |
74 | unsafe extern "C" fn drop_my_bind_data_struct(v: *mut c_void) {
75 | // let actual = v.cast::();
76 | duckdb_free(v);
77 | }
78 |
79 | #[no_mangle]
80 | unsafe extern "C" fn partition_init(info: duckdb_init_info) {
81 | let info = InitInfo::from(info);
82 |
83 | let mut my_init_data = malloc_struct::();
84 | (*my_init_data).done = false;
85 | info.set_init_data(my_init_data.cast(), Some(duckdb_free));
86 | }
87 |
88 | #[no_mangle]
89 | unsafe extern "C" fn partition_read(info: duckdb_function_info, chunk: duckdb_data_chunk) {
90 | let info = FunctionInfo::from(info);
91 | let output = DataChunk::from(chunk);
92 | if let Err(err) = internal_read(&info, &output) {
93 | info.set_error(&err.to_string());
94 | }
95 | }
96 |
97 | unsafe fn internal_read(info: &FunctionInfo, output: &DataChunk) -> Result<()> {
98 | let bind_data = info.get_bind_data::();
99 | let inner = &mut *(*bind_data).0;
100 | let mut init_data = info.get_init_data::();
101 | if (*init_data).done {
102 | output.set_size(0);
103 | return Ok(());
104 | }
105 |
106 | let admin = inner.admin.as_ref();
107 | let partitions = run_block_on(async { admin.all::().await })?;
108 |
109 | let mut row = 0;
110 | for partition in partitions {
111 | // name
112 |
113 | let (topic, partition_key) = {
114 | let parse_key: Result = partition.name.clone().try_into();
115 | match parse_key {
116 | Ok(key) => {
117 | let (topic, partition) = key.split();
118 | (topic, partition.to_string())
119 | }
120 | Err(err) => (err.to_string(), "-1".to_owned()),
121 | }
122 | };
123 |
124 | let topic_vector = output.get_vector(0);
125 | topic_vector.assign_string_element(row, topic.as_bytes());
126 |
127 | let partition_vector = output.get_vector(1);
128 | partition_vector.assign_string_element(row, partition_key.as_bytes());
129 |
130 | let leo_vector = output.get_vector(2);
131 | leo_vector.set_data(row as usize, partition.status.leader.leo as u32);
132 |
133 | row += 1;
134 | }
135 |
136 | output.set_size(row);
137 | (*init_data).done = true;
138 |
139 | Ok(())
140 | }
141 |
--------------------------------------------------------------------------------
/src/topic.rs:
--------------------------------------------------------------------------------
1 | use std::boxed::Box;
2 | use std::ffi::c_void;
3 |
4 | use anyhow::Result;
5 | use libduckdb_sys::{
6 | duckdb_bind_info, duckdb_data_chunk, duckdb_free, duckdb_function_info, duckdb_init_info,
7 | };
8 | use tracing::debug;
9 |
10 | use fluvio::metadata::topic::TopicSpec;
11 |
12 | use fluvio::{Fluvio, FluvioAdmin};
13 | use fluvio_future::task::run_block_on;
14 |
15 | use crate::bind::{
16 | malloc_struct, BindInfo, DataChunk, DuckDBTypeEnum, FunctionInfo, InitInfo, LogicalType,
17 | TableFunction,
18 | };
19 |
20 | pub fn fluvio_admin_topic_function_def() -> TableFunction {
21 | let table_function = TableFunction::new();
22 | table_function.set_name("fluvio_topics");
23 |
24 | table_function.set_function(Some(topic_read));
25 | table_function.set_init(Some(topic_init));
26 | table_function.set_bind(Some(topic_bind));
27 | table_function
28 | }
29 |
30 | struct FluvioAdminInner {
31 | admin: Box,
32 | }
33 |
34 | #[repr(C)]
35 | struct TopicBindDataStruct(*mut FluvioAdminInner);
36 |
37 | #[repr(C)]
38 | struct TopicInitDataStruct {
39 | done: bool,
40 | }
41 |
42 | /// set up duck db table columns
43 | #[no_mangle]
44 | unsafe extern "C" fn topic_bind(bind_ptr: duckdb_bind_info) {
45 | let bind_info = BindInfo::from(bind_ptr);
46 | if let Err(err) = internal_bind(&bind_info) {
47 | bind_info.set_error(&err.to_string());
48 | }
49 | }
50 |
51 | unsafe fn internal_bind(bind_info: &BindInfo) -> Result<()> {
52 | bind_info.add_result_column("name", LogicalType::new(DuckDBTypeEnum::Varchar));
53 | bind_info.add_result_column("partitions", LogicalType::new(DuckDBTypeEnum::Integer));
54 |
55 | let admin = run_block_on(async {
56 | let fluvio = Fluvio::connect().await?;
57 | let admin = fluvio.admin().await;
58 | Ok(admin) as Result
59 | })?;
60 |
61 | let boxed_admin = Box::new(admin);
62 | let bind_inner = Box::new(FluvioAdminInner { admin: boxed_admin });
63 | debug!("amin created");
64 |
65 | let my_bind_data = malloc_struct::();
66 | (*my_bind_data).0 = Box::into_raw(bind_inner);
67 | bind_info.set_bind_data(my_bind_data.cast(), Some(drop_my_bind_data_struct));
68 |
69 | Ok(())
70 | }
71 |
72 | unsafe extern "C" fn drop_my_bind_data_struct(v: *mut c_void) {
73 | // let actual = v.cast::();
74 | duckdb_free(v);
75 | }
76 |
77 | #[no_mangle]
78 | unsafe extern "C" fn topic_init(info: duckdb_init_info) {
79 | let info = InitInfo::from(info);
80 |
81 | let mut my_init_data = malloc_struct::();
82 | (*my_init_data).done = false;
83 | info.set_init_data(my_init_data.cast(), Some(duckdb_free));
84 | }
85 |
86 | #[no_mangle]
87 | unsafe extern "C" fn topic_read(info: duckdb_function_info, chunk: duckdb_data_chunk) {
88 | let info = FunctionInfo::from(info);
89 | let output = DataChunk::from(chunk);
90 | if let Err(err) = internal_read(&info, &output) {
91 | info.set_error(&err.to_string());
92 | }
93 | }
94 |
95 | /// read data from fluvio
96 | #[no_mangle]
97 | unsafe fn internal_read(info: &FunctionInfo, output: &DataChunk) -> Result<()> {
98 | let _bind_data = info.get_bind_data::();
99 |
100 | let bind_data = info.get_bind_data::();
101 | let inner = &mut *(*bind_data).0;
102 | let mut init_data = info.get_init_data::();
103 | if (*init_data).done {
104 | output.set_size(0);
105 | return Ok(());
106 | }
107 |
108 | let admin = inner.admin.as_ref();
109 | let topics = run_block_on(async { admin.all::().await })?;
110 |
111 | let mut row = 0;
112 | for topic in topics {
113 | // name
114 | let value_vector = output.get_vector(0);
115 | value_vector.assign_string_element(row, topic.name.as_bytes());
116 |
117 | let offset_vector = output.get_vector(1);
118 | offset_vector.set_data(row as usize, topic.spec.partitions());
119 | row += 1;
120 | }
121 |
122 | output.set_size(row);
123 | (*init_data).done = true;
124 |
125 | Ok(())
126 | }
127 |
--------------------------------------------------------------------------------
/src/wrapper.c:
--------------------------------------------------------------------------------
1 | /*
2 | * because we link twice (once to the rust library, and once to the duckdb library) we need a bridge to export the rust symbols
3 | * this is that bridge
4 | */
5 |
6 | #include "wrapper.h"
7 |
8 | const char* fluvioduck_version_rust(void);
9 | void fluvioduck_init_rust(void* db);
10 |
11 | DUCKDB_EXTENSION_API const char* fluvioduck_version() {
12 | return fluvioduck_version_rust();
13 | }
14 |
15 | DUCKDB_EXTENSION_API void fluvioduck_init(void* db) {
16 | fluvioduck_init_rust(db);
17 | }
18 |
--------------------------------------------------------------------------------
/src/wrapper.h:
--------------------------------------------------------------------------------
1 | #define DUCKDB_EXTENSION_API
2 | #include "duckdb.h"
3 |
--------------------------------------------------------------------------------
/toolchain.toml:
--------------------------------------------------------------------------------
1 | [toolchain]
2 | channel = "stable-2023-01-24"
3 |
--------------------------------------------------------------------------------