diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd2bc16..fedb591 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: echo foo | fluvio produce foobar fluvio consume foobar -B -d - name: Install wasm target - run: rustup target add wasm32-unknown-unknown + run: rustup target add wasm32-wasi - name: Run Integration Test timeout-minutes: 30 run: make integration_tests diff --git a/Cargo.lock b/Cargo.lock index dfe8161..436cb52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,6 +55,12 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "ambient-authority" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -624,6 +630,83 @@ dependencies = [ "serde", ] +[[package]] +name = "cap-fs-ext" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88e341d15ac1029aadce600be764a1a1edafe40e03cde23285bc1d261b3a4866" +dependencies = [ + "cap-primitives", + "cap-std", + "io-lifetimes 2.0.3", + "windows-sys 0.52.0", +] + +[[package]] +name = "cap-net-ext" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434168fe6533055f0f4204039abe3ff6d7db338ef46872a5fa39e9d5ad5ab7a9" +dependencies = [ + "cap-primitives", + "cap-std", + "rustix 0.38.34", + "smallvec", +] + +[[package]] +name = "cap-primitives" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe16767ed8eee6d3f1f00d6a7576b81c226ab917eb54b96e5f77a5216ef67abb" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes 2.0.3", + "ipnet", + "maybe-owned", + "rustix 0.38.34", + "windows-sys 0.52.0", + "winx", +] + +[[package]] +name = "cap-rand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20e5695565f0cd7106bc3c7170323597540e772bb73e0be2cd2c662a0f8fa4ca" +dependencies = [ + "ambient-authority", + "rand", +] + +[[package]] +name = "cap-std" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "593db20e4c51f62d3284bae7ee718849c3214f93a3b94ea1899ad85ba119d330" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes 2.0.3", + "rustix 0.38.34", +] + +[[package]] +name = "cap-time-ext" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03261630f291f425430a36f38c847828265bc928f517cdd2004c56f4b02f002b" +dependencies = [ + "ambient-authority", + "cap-primitives", + "iana-time-zone", + "once_cell", + "rustix 0.38.34", + "winx", +] + [[package]] name = "cc" version = "1.0.95" @@ -815,7 +898,7 @@ dependencies = [ "itertools 0.10.5", "log", "smallvec", - "wasmparser", + "wasmparser 0.116.1", "wasmtime-types", ] @@ -1078,6 +1161,15 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + [[package]] name = "enum-ordinalize" version = "3.1.15" @@ -1219,6 +1311,17 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +[[package]] +name = "fd-lock" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" +dependencies = [ + "cfg-if", + "rustix 0.38.34", + "windows-sys 0.52.0", +] + [[package]] name = "finl_unicode" version = "1.2.0" @@ -1249,8 +1352,8 @@ dependencies = [ [[package]] name = "fluvio" -version = "0.21.9" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.22.2" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "anyhow", "async-channel 1.9.0", @@ -1289,7 +1392,7 @@ dependencies = [ [[package]] name = "fluvio-compression" version = "0.3.2" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "bytes", "flate2", @@ -1303,7 +1406,7 @@ dependencies = [ [[package]] name = "fluvio-connector-common" version = "0.0.0" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "anyhow", "async-net", @@ -1325,7 +1428,7 @@ dependencies = [ [[package]] name = "fluvio-connector-derive" version = "0.0.0" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "proc-macro2", "quote", @@ -1335,7 +1438,7 @@ dependencies = [ [[package]] name = "fluvio-connector-package" version = "0.0.0" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "anyhow", "bytesize", @@ -1355,8 +1458,8 @@ dependencies = [ [[package]] name = "fluvio-controlplane-metadata" -version = "0.27.0" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.28.1" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "anyhow", "async-trait", @@ -1415,8 +1518,8 @@ dependencies = [ [[package]] name = "fluvio-protocol" -version = "0.10.12" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.10.13" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "bytes", "content_inspector", @@ -1437,7 +1540,7 @@ dependencies = [ [[package]] name = "fluvio-protocol-derive" version = "0.5.4" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "proc-macro2", "quote", @@ -1447,8 +1550,8 @@ dependencies = [ [[package]] name = "fluvio-sc-schema" -version = "0.23.0" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.24.0" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "anyhow", "fluvio-controlplane-metadata", @@ -1464,8 +1567,8 @@ dependencies = [ [[package]] name = "fluvio-smartengine" -version = "0.7.10" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.7.12" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "anyhow", "cfg-if", @@ -1480,12 +1583,13 @@ dependencies = [ "thiserror", "tracing", "wasmtime", + "wasmtime-wasi", ] [[package]] name = "fluvio-smartmodule" version = "0.7.3" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "eyre", "fluvio-protocol", @@ -1496,8 +1600,8 @@ dependencies = [ [[package]] name = "fluvio-smartmodule-derive" -version = "0.6.2" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.6.3" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "proc-macro2", "quote", @@ -1506,8 +1610,8 @@ dependencies = [ [[package]] name = "fluvio-socket" -version = "0.14.7" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.14.8" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "async-channel 1.9.0", "async-lock 2.8.0", @@ -1531,8 +1635,8 @@ dependencies = [ [[package]] name = "fluvio-spu-schema" -version = "0.14.6" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.14.7" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "bytes", "derive_builder", @@ -1549,8 +1653,8 @@ dependencies = [ [[package]] name = "fluvio-stream-model" -version = "0.11.1" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +version = "0.11.2" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "async-rwlock", "event-listener 3.1.0", @@ -1563,7 +1667,7 @@ dependencies = [ [[package]] name = "fluvio-types" version = "0.4.6" -source = "git+https://github.com/infinyon/fluvio?rev=af1fcea0b50a8243de3f2b8e613646aa8b74fc92#af1fcea0b50a8243de3f2b8e613646aa8b74fc92" +source = "git+https://github.com/infinyon/fluvio?tag=v0.11.8#919aa365b25a6193efb55961d5e84dc2ee804100" dependencies = [ "event-listener 3.1.0", "serde", @@ -1627,6 +1731,17 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-set-times" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "033b337d725b97690d86893f9de22b67b80dcc4e9ad815f348254c38119db8fb" +dependencies = [ + "io-lifetimes 2.0.3", + "rustix 0.38.34", + "windows-sys 0.52.0", +] + [[package]] name = "funty" version = "2.0.0" @@ -2146,6 +2261,16 @@ dependencies = [ "uuid", ] +[[package]] +name = "io-extras" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9f046b9af244f13b3bd939f55d16830ac3a201e8a9ba9661bfcb03e2be72b9b" +dependencies = [ + "io-lifetimes 2.0.3", + "windows-sys 0.52.0", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -2157,6 +2282,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "io-lifetimes" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a611371471e98973dbcab4e0ec66c31a10bc356eeb4d54a0e05eac8158fe38c" + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + [[package]] name = "itertools" version = "0.10.5" @@ -2376,6 +2513,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + [[package]] name = "md-5" version = "0.10.6" @@ -3091,7 +3234,7 @@ checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", "errno", - "io-lifetimes", + "io-lifetimes 1.0.11", "libc", "linux-raw-sys 0.3.8", "windows-sys 0.48.0", @@ -3105,8 +3248,10 @@ checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", + "itoa", "libc", "linux-raw-sys 0.4.13", + "once_cell", "windows-sys 0.52.0", ] @@ -3298,6 +3443,15 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shellexpand" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" +dependencies = [ + "dirs 4.0.0", +] + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -3587,6 +3741,22 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "system-interface" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" +dependencies = [ + "bitflags 2.5.0", + "cap-fs-ext", + "cap-std", + "fd-lock", + "io-lifetimes 2.0.3", + "rustix 0.38.34", + "windows-sys 0.52.0", + "winx", +] + [[package]] name = "tap" version = "1.0.1" @@ -4020,6 +4190,49 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi-cap-std-sync" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4328de5cf2a0debfc48216fe9c2747badc64957837641f5836cd8b3d48d73f0" +dependencies = [ + "anyhow", + "async-trait", + "cap-fs-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "io-extras", + "io-lifetimes 2.0.3", + "once_cell", + "rustix 0.38.34", + "system-interface", + "tracing", + "wasi-common", + "windows-sys 0.48.0", +] + +[[package]] +name = "wasi-common" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84f6774ec9e464b7373f683bc57ff87fcca5fd26a7d6bdb7438fb2f56a545aa6" +dependencies = [ + "anyhow", + "bitflags 2.5.0", + "cap-rand", + "cap-std", + "io-extras", + "log", + "rustix 0.38.34", + "thiserror", + "tracing", + "wasmtime", + "wiggle", + "windows-sys 0.48.0", +] + [[package]] name = "wasite" version = "0.1.0" @@ -4120,6 +4333,27 @@ dependencies = [ "semver", ] +[[package]] +name = "wasmparser" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +dependencies = [ + "bitflags 2.5.0", + "indexmap 2.2.6", + "semver", +] + +[[package]] +name = "wasmprinter" +version = "0.2.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60e73986a6b7fdfedb7c5bf9e7eb71135486507c8fbc4c0c42cffcb6532988b7" +dependencies = [ + "anyhow", + "wasmparser 0.121.2", +] + [[package]] name = "wasmtime" version = "15.0.1" @@ -4131,6 +4365,7 @@ dependencies = [ "bincode", "bumpalo", "cfg-if", + "encoding_rs", "fxprof-processed-profile", "indexmap 2.2.6", "libc", @@ -4145,14 +4380,16 @@ dependencies = [ "serde_json", "target-lexicon", "wasm-encoder 0.36.2", - "wasmparser", + "wasmparser 0.116.1", "wasmtime-cache", "wasmtime-component-macro", + "wasmtime-component-util", "wasmtime-cranelift", "wasmtime-environ", "wasmtime-fiber", "wasmtime-jit", "wasmtime-runtime", + "wasmtime-winch", "wat", "windows-sys 0.48.0", ] @@ -4226,7 +4463,7 @@ dependencies = [ "object", "target-lexicon", "thiserror", - "wasmparser", + "wasmparser 0.116.1", "wasmtime-cranelift-shared", "wasmtime-environ", "wasmtime-versioned-export-macros", @@ -4264,7 +4501,10 @@ dependencies = [ "serde_derive", "target-lexicon", "thiserror", - "wasmparser", + "wasm-encoder 0.36.2", + "wasmparser 0.116.1", + "wasmprinter", + "wasmtime-component-util", "wasmtime-types", ] @@ -4342,6 +4582,7 @@ dependencies = [ "anyhow", "cc", "cfg-if", + "encoding_rs", "indexmap 2.2.6", "libc", "log", @@ -4372,7 +4613,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "wasmparser", + "wasmparser 0.116.1", ] [[package]] @@ -4386,6 +4627,58 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "wasmtime-wasi" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff3f4ad191a5e6d002bb5bffa3e2931a58984da9b30e57b48f353848748cf80" +dependencies = [ + "anyhow", + "async-trait", + "bitflags 2.5.0", + "bytes", + "cap-fs-ext", + "cap-net-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "futures", + "io-extras", + "io-lifetimes 2.0.3", + "libc", + "log", + "once_cell", + "rustix 0.38.34", + "system-interface", + "thiserror", + "tokio", + "tracing", + "url", + "wasi-cap-std-sync", + "wasi-common", + "wasmtime", + "wiggle", + "windows-sys 0.48.0", +] + +[[package]] +name = "wasmtime-winch" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d638e7c72447253485fe131523e7465ca318c0455c826eb4f5f612fb67b7de90" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli", + "object", + "target-lexicon", + "wasmparser 0.116.1", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "winch-codegen", +] + [[package]] name = "wasmtime-wit-bindgen" version = "15.0.1" @@ -4404,6 +4697,15 @@ version = "15.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6060bc082cc32d9a45587c7640e29e3c7b89ada82677ac25d87850aaccb368" +[[package]] +name = "wast" +version = "35.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" +dependencies = [ + "leb128", +] + [[package]] name = "wast" version = "205.0.0" @@ -4423,7 +4725,7 @@ version = "1.205.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19832624d606e7c6bf3cd4caa73578ecec5eac30c768269256d19c79900beb18" dependencies = [ - "wast", + "wast 205.0.0", ] [[package]] @@ -4466,6 +4768,48 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wiggle" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91028b241e692fdf30627ac10ba9d5ac378353ea4119b4f904ac95177057a44" +dependencies = [ + "anyhow", + "async-trait", + "bitflags 2.5.0", + "thiserror", + "tracing", + "wasmtime", + "wiggle-macro", +] + +[[package]] +name = "wiggle-generate" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e8b3d76531994513671b2ec3b29fd342bf041e2282945bb6c52eebe6aa9e7da" +dependencies = [ + "anyhow", + "heck", + "proc-macro2", + "quote", + "shellexpand", + "syn 2.0.60", + "witx", +] + +[[package]] +name = "wiggle-macro" +version = "15.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c189fe00c67f61bb330827f2abab1af9b5925c7929535cd13a68d265ec20b02d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", + "wiggle-generate", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4488,6 +4832,22 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "winch-codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c792487f4dc42733d182a72e75d718b1a563cedcc1599ff0a9ed683c33e8bb7" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli", + "regalloc2", + "smallvec", + "target-lexicon", + "wasmparser 0.116.1", + "wasmtime-environ", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -4654,6 +5014,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "winx" +version = "0.36.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9643b83820c0cd246ecabe5fa454dd04ba4fa67996369466d0747472d337346" +dependencies = [ + "bitflags 2.5.0", + "windows-sys 0.52.0", +] + [[package]] name = "wit-parser" version = "0.13.2" @@ -4671,6 +5041,18 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "witx" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" +dependencies = [ + "anyhow", + "log", + "thiserror", + "wast 35.0.2", +] + [[package]] name = "ws_stream_wasm" version = "0.7.4" diff --git a/Cargo.toml b/Cargo.toml index bbc5d1b..d7e890e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,8 @@ inherits = "release" lto = true [workspace.dependencies] -fluvio = { git = "https://github.com/infinyon/fluvio", rev = "af1fcea0b50a8243de3f2b8e613646aa8b74fc92" } -fluvio-connector-common = { git = "https://github.com/infinyon/fluvio", rev = "af1fcea0b50a8243de3f2b8e613646aa8b74fc92" } fluvio-future = "0.6.2" -fluvio-smartmodule = { git = "https://github.com/infinyon/fluvio", rev = "af1fcea0b50a8243de3f2b8e613646aa8b74fc92" } + +fluvio = { git = "https://github.com/infinyon/fluvio", tag = "v0.11.8" } +fluvio-connector-common = { git = "https://github.com/infinyon/fluvio", tag = "v0.11.8" } +fluvio-smartmodule = { git = "https://github.com/infinyon/fluvio", tag = "v0.11.8" } diff --git a/README.md b/README.md index 2c1a9c7..ede49c4 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # Fluvio SQL Sink connector -The SQL Sink connector reads records from Fluvio topic, applies configured transformations, and -sends new records to the SQL database (via `INSERT` statements). +The SQL Sink connector reads records from Fluvio topic, applies configured transformations, and +sends new records to the SQL database (via `INSERT` statements). ## Supported databases 1. PostgreSQL 2. SQLite ### Data types -| Model | PostgreSQL | SQLite | +| Model | PostgreSQL | SQLite | |:----------------|:-----------------------------|:-------------| | Bool | BOOL | BOOLEAN | | Char | CHAR | INTEGER | @@ -29,7 +29,7 @@ sends new records to the SQL database (via `INSERT` statements). The SQL Sink connector expects the data in [Fluvio SQL Model](./crates/fluvio-model-sql/README.md) in JSON format. In order to work with different data formats or data structures, `transformations` can be applied. The transformation is a SmartModule pulled from the SmartModule Hub. Transformations are chained according to the order -in the config. If a SmartModule requires configuration, it is passed via `with` section of `transforms` entry. +in the config. If a SmartModule requires configuration, it is passed via `with` section of `transforms` entry. ## Configuration | Option | default | type | description | @@ -40,7 +40,7 @@ in the config. If a SmartModule requires configuration, it is passed via `with` ```yaml apiVersion: 0.1.0 meta: - version: 0.4.1 + version: 0.4.2 name: my-sql-connector type: sql-sink topic: sql-topic @@ -62,7 +62,7 @@ The connector can use secrets in order to hide sensitive information. ```yaml apiVersion: 0.1.0 meta: - version: 0.4.1 + version: 0.4.2 name: my-sql-connector type: sql-sink topic: sql-topic @@ -73,13 +73,13 @@ sql: ``` ### Offset Management -Fluvio Consumer Offset feature allows for a connector to store the offset in the Fluvio cluster and use it on restart. -To activate it, you need to provide the `consumer` name and set the `strategy: auto`. +Fluvio Consumer Offset feature allows for a connector to store the offset in the Fluvio cluster and use it on restart. +To activate it, you need to provide the `consumer` name and set the `strategy: auto`. See the example below: ```yaml apiVersion: 0.2.0 meta: - version: 0.4.1 + version: 0.4.2 name: my-sql-connector type: sql-sink topic: @@ -126,7 +126,7 @@ Connector configuration file: # connector-config.yaml apiVersion: 0.1.0 meta: - version: 0.4.1 + version: 0.4.2 name: json-sql-connector type: sql-sink topic: sql-topic @@ -187,7 +187,7 @@ Connector configuration file for upsert (assuming `device_id` is a unique column # connector-config.yaml apiVersion: 0.1.0 meta: - version: 0.4.1 + version: 0.4.2 name: json-sql-connector type: sql-sink topic: sql-topic diff --git a/crates/sql-sink/Connector.toml b/crates/sql-sink/Connector.toml index d6559cf..21869c0 100644 --- a/crates/sql-sink/Connector.toml +++ b/crates/sql-sink/Connector.toml @@ -1,7 +1,7 @@ [package] name = "sql-sink" group = "infinyon" -version = "0.4.1" +version = "0.4.2" apiVersion = "0.1.0" fluvio = "0.11.6" description = "SQL sink connector"