From 1e334ce381dba365f8aca9826ca5d3f34a34c993 Mon Sep 17 00:00:00 2001 From: Filippo Pacifici Date: Thu, 21 May 2026 10:48:00 -0700 Subject: [PATCH 1/2] wasm support --- examples/wasm_guest/.gitignore | 7 + examples/wasm_guest/Makefile | 19 + examples/wasm_guest/README.md | 21 + examples/wasm_guest/pyproject.toml | 11 + examples/wasm_guest/src/guest_impl.py | 31 + examples/wasm_guest/uv.lock | 30 + examples/wasm_guest/wit/processor.wit | 1 + sentry_streams/Cargo.lock | 1436 ++++++++++++++++- sentry_streams/Cargo.toml | 2 + .../adapters/arroyo/rust_arroyo.py | 21 + .../deployment_config/wasm_processor.yaml | 18 + .../sentry_streams/examples/wasm_processor.py | 17 + .../sentry_streams/pipeline/__init__.py | 2 + .../sentry_streams/pipeline/pipeline.py | 21 + .../sentry_streams/rust_streams.pyi | 2 + sentry_streams/src/lib.rs | 1 + sentry_streams/src/operators.rs | 15 + sentry_streams/src/wasm_processor.rs | 475 ++++++ .../tests/fixtures/wasm_passthrough.wasm | Bin 0 -> 76109 bytes .../tests/pipeline/test_wasm_processor.py | 24 + .../wasm_passthrough_guest/.cargo/config.toml | 5 + .../tests/wasm_passthrough_guest/Cargo.lock | 806 +++++++++ .../tests/wasm_passthrough_guest/Cargo.toml | 10 + .../tests/wasm_passthrough_guest/Makefile | 5 + .../tests/wasm_passthrough_guest/README.md | 10 + .../tests/wasm_passthrough_guest/src/lib.rs | 44 + sentry_streams/uv.lock | 4 +- sentry_streams/wit/processor.wit | 36 + 28 files changed, 3004 insertions(+), 70 deletions(-) create mode 100644 examples/wasm_guest/.gitignore create mode 100644 examples/wasm_guest/Makefile create mode 100644 examples/wasm_guest/README.md create mode 100644 examples/wasm_guest/pyproject.toml create mode 100644 examples/wasm_guest/src/guest_impl.py create mode 100644 examples/wasm_guest/uv.lock create mode 120000 examples/wasm_guest/wit/processor.wit create mode 100644 sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml create mode 100644 sentry_streams/sentry_streams/examples/wasm_processor.py create mode 100644 sentry_streams/src/wasm_processor.rs create mode 100644 sentry_streams/tests/fixtures/wasm_passthrough.wasm create mode 100644 sentry_streams/tests/pipeline/test_wasm_processor.py create mode 100644 sentry_streams/tests/wasm_passthrough_guest/.cargo/config.toml create mode 100644 sentry_streams/tests/wasm_passthrough_guest/Cargo.lock create mode 100644 sentry_streams/tests/wasm_passthrough_guest/Cargo.toml create mode 100644 sentry_streams/tests/wasm_passthrough_guest/Makefile create mode 100644 sentry_streams/tests/wasm_passthrough_guest/README.md create mode 100644 sentry_streams/tests/wasm_passthrough_guest/src/lib.rs create mode 100644 sentry_streams/wit/processor.wit diff --git a/examples/wasm_guest/.gitignore b/examples/wasm_guest/.gitignore new file mode 100644 index 00000000..ed3a6d1a --- /dev/null +++ b/examples/wasm_guest/.gitignore @@ -0,0 +1,7 @@ +.venv/ +dist/ +src/wit_world/ +src/componentize_py_*/ +src/poll_loop.py +src/componentize_py_types.py +src/componentize_py_runtime.pyi diff --git a/examples/wasm_guest/Makefile b/examples/wasm_guest/Makefile new file mode 100644 index 00000000..0f227df1 --- /dev/null +++ b/examples/wasm_guest/Makefile @@ -0,0 +1,19 @@ +WIT_DIR := wit +SRC_DIR := src +DIST_DIR := dist +WASM := $(DIST_DIR)/plugin.wasm + +.PHONY: bindings build clean + +bindings: + uv run componentize-py -d $(WIT_DIR) -w plugin bindings $(SRC_DIR) + +$(WASM): $(SRC_DIR)/guest_impl.py $(WIT_DIR)/processor.wit + @mkdir -p $(DIST_DIR) + $(MAKE) bindings + uv run componentize-py -d $(WIT_DIR) -w plugin componentize -p $(SRC_DIR) guest_impl -o $(WASM) + +build: $(WASM) + +clean: + rm -rf $(DIST_DIR) $(SRC_DIR)/wit_world $(SRC_DIR)/componentize_py_* diff --git a/examples/wasm_guest/README.md b/examples/wasm_guest/README.md new file mode 100644 index 00000000..ee14945c --- /dev/null +++ b/examples/wasm_guest/README.md @@ -0,0 +1,21 @@ +# sentry_streams WASM guest example + +Sample [componentize-py](https://github.com/bytecodealliance/componentize-py) guest for the +`sentry-streams:processor` WIT world used by `WasmProcessor` in the Rust Arroyo adapter. + +## Build + +```bash +make build +``` + +Produces `dist/plugin.wasm`. The WIT contract lives in +[`../../sentry_streams/wit/processor.wit`](../../sentry_streams/wit/processor.wit). + +## Guest behavior + +- `submit`: buffers the message for the next `poll` +- `submit_watermark`: buffers the watermark for the next `poll` +- `poll`: returns all buffered outputs (messages and watermarks), or `None` if empty + +Uses the host `log` import for tracing. diff --git a/examples/wasm_guest/pyproject.toml b/examples/wasm_guest/pyproject.toml new file mode 100644 index 00000000..8d46e03c --- /dev/null +++ b/examples/wasm_guest/pyproject.toml @@ -0,0 +1,11 @@ +[project] +name = "sentry-streams-wasm-guest" +version = "0.1.0" +description = "Example componentize-py guest for sentry_streams WasmProcessor" +requires-python = ">=3.11" +dependencies = [ + "componentize-py>=0.23.0", +] + +[tool.uv] +dev-dependencies = [] diff --git a/examples/wasm_guest/src/guest_impl.py b/examples/wasm_guest/src/guest_impl.py new file mode 100644 index 00000000..6adef192 --- /dev/null +++ b/examples/wasm_guest/src/guest_impl.py @@ -0,0 +1,31 @@ +"""Sample WASM processor guest: passthrough with host logging.""" + +from __future__ import annotations + +from typing import List, Optional + +from wit_world.exports import Processor as ProcessorProtocol +from wit_world.exports import processor as proc +from wit_world.imports import log as host_log + + +class Processor(ProcessorProtocol): + """Buffers submitted messages and watermarks; returns them on ``poll``.""" + + def __init__(self) -> None: + self._pending: List[proc.Output] = [] + + def submit(self, msg: proc.Message) -> None: + host_log.info(f"submit message len={len(msg.payload)}") + self._pending.append(proc.Output_Msg(value=msg)) + + def submit_watermark(self, wm: proc.Watermark) -> None: + host_log.info("submit_watermark") + self._pending.append(proc.Output_Wm(value=wm)) + + def poll(self) -> Optional[List[proc.Output]]: + if not self._pending: + return None + out = self._pending + self._pending = [] + return out diff --git a/examples/wasm_guest/uv.lock b/examples/wasm_guest/uv.lock new file mode 100644 index 00000000..6cd8c4e2 --- /dev/null +++ b/examples/wasm_guest/uv.lock @@ -0,0 +1,30 @@ +version = 1 +revision = 2 +requires-python = ">=3.11" + +[[package]] +name = "componentize-py" +version = "0.23.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ac/d6/862d195136a671671ed06363ffcb45dc38682b3b5bb4a8eaa9500464de84/componentize_py-0.23.0.tar.gz", hash = "sha256:8d5ea3dbdf6642aca4a9329be30861189c1066e1651d2ab73bb3b0f1d9871407", size = 203590, upload-time = "2026-04-15T17:25:48.104Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e2/a9/f5a3975d05cec7f3a95a6e931d73204aa3592280113effd7a0ac1f741864/componentize_py-0.23.0-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:bcd956598441713d1920396af9896ab19753bcb568299ff2db85f43bb65286ed", size = 16108001, upload-time = "2026-04-15T17:25:14.424Z" }, + { url = "https://files.pythonhosted.org/packages/75/9f/e4b08061e9f0c0abe61806b28f99ac094e2a19bdf312108c9b38be499d74/componentize_py-0.23.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:d4b9b52e548f962c9ba36f15ce9793689bd29beb18a52b3480d317fc773e4506", size = 15269777, upload-time = "2026-04-15T17:25:21.826Z" }, + { url = "https://files.pythonhosted.org/packages/f8/df/b8161bcc0b4158a7cc75d558bd9b16b67bbd27ae7511ef2d06db4bea88c3/componentize_py-0.23.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:939acedff58eba1f4864ebe9327c742e5cf52bf6e08eddfb699e82761c5ede9f", size = 16237698, upload-time = "2026-04-15T17:25:29.46Z" }, + { url = "https://files.pythonhosted.org/packages/77/8d/426f07b84efed1b98076b4193f8d29e1a5e76a2f63fbc8770b2a6f3b589a/componentize_py-0.23.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:99eaa2cc8b5d737d2b23237618332a21838f892eec7f0359b44c464659a15ecc", size = 16808229, upload-time = "2026-04-15T17:25:37.562Z" }, + { url = "https://files.pythonhosted.org/packages/bc/9c/1c725d88d33fdc99c008fde287098b037f71c18197d54477e4ed0db101b2/componentize_py-0.23.0-cp39-abi3-win_amd64.whl", hash = "sha256:1d65d73c97ea751d2dc958fba085c501e68a7c68cf4611df910b99e18fb2057e", size = 14884887, upload-time = "2026-04-15T17:25:44.983Z" }, +] + +[[package]] +name = "sentry-streams-wasm-guest" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "componentize-py" }, +] + +[package.metadata] +requires-dist = [{ name = "componentize-py", specifier = ">=0.23.0" }] + +[package.metadata.requires-dev] +dev = [] diff --git a/examples/wasm_guest/wit/processor.wit b/examples/wasm_guest/wit/processor.wit new file mode 120000 index 00000000..ca6974a6 --- /dev/null +++ b/examples/wasm_guest/wit/processor.wit @@ -0,0 +1 @@ +../../../sentry_streams/wit/processor.wit \ No newline at end of file diff --git a/sentry_streams/Cargo.lock b/sentry_streams/Cargo.lock index 6a7fe2eb..00f8e63c 100644 --- a/sentry_streams/Cargo.lock +++ b/sentry_streams/Cargo.lock @@ -186,6 +186,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[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" @@ -257,6 +269,21 @@ version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +[[package]] +name = "ar_archive_writer" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" +dependencies = [ + "object 0.37.3", +] + +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" + [[package]] name = "async-trait" version = "0.1.89" @@ -290,11 +317,17 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.36.7", "rustc-demangle", "windows-targets 0.52.6", ] +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "base64" version = "0.22.1" @@ -313,6 +346,15 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "block2" version = "0.6.2" @@ -327,6 +369,15 @@ name = "bumpalo" version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +dependencies = [ + "allocator-api2", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" @@ -343,12 +394,93 @@ dependencies = [ "bytes", ] +[[package]] +name = "cap-fs-ext" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5528f85b1e134ae811704e41ef80930f56e795923f866813255bc342cc20654" +dependencies = [ + "cap-primitives", + "cap-std", + "io-lifetimes", + "windows-sys 0.59.0", +] + +[[package]] +name = "cap-net-ext" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20a158160765c6a7d0d8c072a53d772e4cb243f38b04bfcf6b4939cfbe7482e7" +dependencies = [ + "cap-primitives", + "cap-std", + "rustix 1.0.7", + "smallvec", +] + +[[package]] +name = "cap-primitives" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cf3aea8a5081171859ef57bc1606b1df6999df4f1110f8eef68b30098d1d3a" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes", + "ipnet", + "maybe-owned", + "rustix 1.0.7", + "rustix-linux-procfs", + "windows-sys 0.59.0", + "winx", +] + +[[package]] +name = "cap-rand" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8144c22e24bbcf26ade86cb6501a0916c46b7e4787abdb0045a467eb1645a1d" +dependencies = [ + "ambient-authority", + "rand 0.8.5", +] + +[[package]] +name = "cap-std" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6dc3090992a735d23219de5c204927163d922f42f575a0189b005c62d37549a" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes", + "rustix 1.0.7", +] + +[[package]] +name = "cap-time-ext" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def102506ce40c11710a9b16e614af0cde8e76ae51b1f48c04b8d79f4b671a80" +dependencies = [ + "ambient-authority", + "cap-primitives", + "iana-time-zone", + "once_cell", + "rustix 1.0.7", + "winx", +] + [[package]] name = "cc" -version = "1.2.17" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -439,6 +571,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror 2.0.17", +] + [[package]] name = "colorchoice" version = "1.0.4" @@ -480,6 +621,150 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpp_demangle" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cranelift-bforest" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e15d04a0ce86cb36ead88ad68cf693ffd6cda47052b9e0ac114bc47fd9cd23c4" +dependencies = [ + "cranelift-entity", +] + +[[package]] +name = "cranelift-bitset" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c6e3969a7ce267259ce244b7867c5d3bc9e65b0a87e81039588dfdeaede9f34" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "cranelift-codegen" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c22032c4cb42558371cf516bb47f26cdad1819d3475c133e93c49f50ebf304e" +dependencies = [ + "bumpalo", + "cranelift-bforest", + "cranelift-bitset", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-control", + "cranelift-entity", + "cranelift-isle", + "gimli", + "hashbrown 0.14.5", + "log", + "regalloc2", + "rustc-hash", + "serde", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cranelift-codegen-meta" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c904bc71c61b27fc57827f4a1379f29de64fe95653b620a3db77d59655eee0b8" +dependencies = [ + "cranelift-codegen-shared", +] + +[[package]] +name = "cranelift-codegen-shared" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40180f5497572f644ce88c255480981ae2ec1d7bb4d8e0c0136a13b87a2f2ceb" + +[[package]] +name = "cranelift-control" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d132c6d0bd8a489563472afc171759da0707804a65ece7ceb15a8c6d7dd5ef" +dependencies = [ + "arbitrary", +] + +[[package]] +name = "cranelift-entity" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2d0d9618275474fbf679dd018ac6e009acbd6ae6850f6a67be33fb3b00b323" +dependencies = [ + "cranelift-bitset", + "serde", + "serde_derive", +] + +[[package]] +name = "cranelift-frontend" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fac41e16729107393174b0c9e3730fb072866100e1e64e80a1a963b2e484d57" +dependencies = [ + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cranelift-isle" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca20d576e5070044d0a72a9effc2deacf4d6aa650403189d8ea50126483944d" + +[[package]] +name = "cranelift-native" +version = "0.116.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dee82f3f1f2c4cba9177f1cc5e350fe98764379bcd29340caa7b01f85076c7" +dependencies = [ + "cranelift-codegen", + "libc", + "target-lexicon", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -495,6 +780,16 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "ctrlc" version = "3.4.6" @@ -557,6 +852,57 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "directories-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + [[package]] name = "dispatch2" version = "0.3.1" @@ -578,6 +924,24 @@ dependencies = [ "syn", ] +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -609,12 +973,35 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + [[package]] name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "fd-lock" +version = "4.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" +dependencies = [ + "cfg-if", + "rustix 1.0.7", + "windows-sys 0.59.0", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + [[package]] name = "findshlibs" version = "0.10.2" @@ -669,6 +1056,31 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-set-times" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" +dependencies = [ + "io-lifetimes", + "rustix 1.0.7", + "windows-sys 0.59.0", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.31" @@ -720,18 +1132,40 @@ dependencies = [ ] [[package]] -name = "gcp_auth" -version = "0.12.3" +name = "fxhash" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf67f30198e045a039264c01fb44659ce82402d7771c50938beb41a5ac87733" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" dependencies = [ - "async-trait", - "base64", - "bytes", - "chrono", - "home", - "http 1.3.1", - "http-body-util", + "byteorder", +] + +[[package]] +name = "fxprof-processed-profile" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" +dependencies = [ + "bitflags", + "debugid", + "fxhash", + "serde", + "serde_json", +] + +[[package]] +name = "gcp_auth" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbf67f30198e045a039264c01fb44659ce82402d7771c50938beb41a5ac87733" +dependencies = [ + "async-trait", + "base64 0.22.1", + "bytes", + "chrono", + "home", + "http 1.3.1", + "http-body-util", "hyper", "hyper-rustls", "hyper-util", @@ -746,6 +1180,16 @@ dependencies = [ "url", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "getrandom" version = "0.2.15" @@ -774,6 +1218,11 @@ name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", +] [[package]] name = "h2" @@ -794,11 +1243,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash 0.1.5", + "serde", +] [[package]] name = "hashbrown" @@ -959,7 +1421,7 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-util", @@ -1118,6 +1580,12 @@ dependencies = [ "syn", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "idna" version = "1.0.3" @@ -1153,8 +1621,25 @@ checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "io-extras" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65" +dependencies = [ + "io-lifetimes", + "windows-sys 0.59.0", ] +[[package]] +name = "io-lifetimes" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" + [[package]] name = "ipnet" version = "2.11.0" @@ -1167,12 +1652,51 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "ittapi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" +dependencies = [ + "anyhow", + "ittapi-sys", + "log", +] + +[[package]] +name = "ittapi-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" +dependencies = [ + "cc", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.2", + "libc", +] + [[package]] name = "js-sys" version = "0.3.77" @@ -1195,12 +1719,39 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cc46bac87ef8093eed6f272babb833b6443374399985ac8ed28471ee0918545" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +dependencies = [ + "libc", +] + [[package]] name = "libz-sys" version = "1.1.22" @@ -1213,6 +1764,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.9.3" @@ -1247,12 +1804,36 @@ version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +[[package]] +name = "mach2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" +dependencies = [ + "libc", +] + +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memfd" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227" +dependencies = [ + "rustix 1.0.7", +] + [[package]] name = "metrics" version = "0.24.3" @@ -1381,7 +1962,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1584,6 +2165,18 @@ name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "crc32fast", + "hashbrown 0.15.2", + "indexmap", + "memchr", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "memchr", ] @@ -1692,6 +2285,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pem-rfc7468" version = "1.0.0" @@ -1751,6 +2350,18 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" +[[package]] +name = "postcard" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "serde", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -1784,6 +2395,28 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea" +dependencies = [ + "ar_archive_writer", + "cc", +] + +[[package]] +name = "pulley-interpreter" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d95f8575df49a2708398182f49a888cf9dc30210fb1fd2df87c889edcee75d" +dependencies = [ + "cranelift-bitset", + "log", + "sptr", + "wasmtime-math", +] + [[package]] name = "pyo3" version = "0.28.3" @@ -1959,6 +2592,26 @@ dependencies = [ "bitflags", ] +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "rdkafka" version = "0.37.0" @@ -2001,6 +2654,31 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.15", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "regalloc2" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc06e6b318142614e4a48bc725abbf08ff166694835c43c9dae5a9009704639a" +dependencies = [ + "allocator-api2", + "bumpalo", + "hashbrown 0.15.2", + "log", + "rustc-hash", + "smallvec", +] + [[package]] name = "regex" version = "1.12.3" @@ -2042,7 +2720,7 @@ version = "0.12.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "encoding_rs", "futures-core", @@ -2086,7 +2764,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-core", @@ -2157,6 +2835,8 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber", + "wasmtime", + "wasmtime-wasi", ] [[package]] @@ -2165,6 +2845,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + [[package]] name = "rustc_version" version = "0.4.1" @@ -2174,6 +2860,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + [[package]] name = "rustix" version = "1.0.7" @@ -2183,10 +2882,20 @@ dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.9.3", "windows-sys 0.59.0", ] +[[package]] +name = "rustix-linux-procfs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" +dependencies = [ + "once_cell", + "rustix 1.0.7", +] + [[package]] name = "rustls" version = "0.23.27" @@ -2307,6 +3016,10 @@ name = "semver" version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] [[package]] name = "sentry" @@ -2321,7 +3034,7 @@ dependencies = [ "sentry-actix", "sentry-backtrace", "sentry-contexts", - "sentry-core 0.48.1", + "sentry-core", "sentry-debug-images", "sentry-panic", "sentry-tracing", @@ -2339,7 +3052,7 @@ dependencies = [ "actix-web", "bytes", "futures-util", - "sentry-core 0.48.1", + "sentry-core", ] [[package]] @@ -2350,7 +3063,7 @@ checksum = "dc84c325ace9ca2388e510fe7d6672b5d60cd8b3bd0eb4bb4ee8314c323cd686" dependencies = [ "backtrace", "regex", - "sentry-core 0.48.1", + "sentry-core", ] [[package]] @@ -2363,23 +3076,10 @@ dependencies = [ "libc", "os_info", "rustc_version", - "sentry-core 0.48.1", + "sentry-core", "uname", ] -[[package]] -name = "sentry-core" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a75011ea1c0d5c46e9e57df03ce81f5c7f0a9e199086334a1f9c0a541e0826" -dependencies = [ - "once_cell", - "rand 0.8.5", - "sentry-types 0.32.3", - "serde", - "serde_json", -] - [[package]] name = "sentry-core" version = "0.48.1" @@ -2387,7 +3087,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f5abf20c42cb1593ec1638976e2647da55f79bccac956444c1707b6cce259a" dependencies = [ "rand 0.9.4", - "sentry-types 0.48.1", + "sentry-types", "serde", "serde_json", "url", @@ -2400,7 +3100,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b88bbe6a760d5724bb40689827e82e8db1e275947df2c59abe171bfc30bb671" dependencies = [ "findshlibs", - "sentry-core 0.48.1", + "sentry-core", ] [[package]] @@ -2410,7 +3110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0260dcb52562b6a79ae7702312a26dba94b79fb5baee7301087529e5ca4e872e" dependencies = [ "sentry-backtrace", - "sentry-core 0.48.1", + "sentry-core", ] [[package]] @@ -2421,28 +3121,11 @@ checksum = "a1c035f3a0a8671ae1a231c5b457abb68b71acba2bf3054dab2a09a9d4ea487e" dependencies = [ "bitflags", "sentry-backtrace", - "sentry-core 0.48.1", + "sentry-core", "tracing-core", "tracing-subscriber", ] -[[package]] -name = "sentry-types" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4519c900ce734f7a0eb7aba0869dfb225a7af8820634a7dd51449e3b093cfb7c" -dependencies = [ - "debugid", - "hex", - "rand 0.8.5", - "serde", - "serde_json", - "thiserror 1.0.69", - "time", - "url", - "uuid", -] - [[package]] name = "sentry-types" version = "0.48.1" @@ -2472,7 +3155,7 @@ dependencies = [ "parking_lot", "rand 0.8.5", "rdkafka", - "sentry-core 0.32.3", + "sentry-core", "serde", "serde_json", "thiserror 1.0.69", @@ -2523,6 +3206,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2535,6 +3227,17 @@ dependencies = [ "serde", ] +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -2544,6 +3247,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", +] + [[package]] name = "shlex" version = "1.3.0" @@ -2579,6 +3291,9 @@ name = "smallvec" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -2601,8 +3316,14 @@ dependencies = [ ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" @@ -2670,6 +3391,22 @@ dependencies = [ "libc", ] +[[package]] +name = "system-interface" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4592f674ce18521c2a81483873a49596655b179f71c5e05d10c1fe66c78745" +dependencies = [ + "bitflags", + "cap-fs-ext", + "cap-std", + "fd-lock", + "io-lifetimes", + "rustix 0.38.44", + "windows-sys 0.59.0", + "winx", +] + [[package]] name = "target-lexicon" version = "0.13.5" @@ -2685,10 +3422,19 @@ dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", - "rustix", + "rustix 1.0.7", "windows-sys 0.59.0", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -2842,23 +3588,47 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", + "serde", + "serde_spanned", "toml_datetime", + "toml_write", "winnow", ] +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + [[package]] name = "tower" version = "0.5.2" @@ -2972,12 +3742,29 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "trait-variant" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typenum" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" + [[package]] name = "uname" version = "0.1.1" @@ -2999,6 +3786,12 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -3017,7 +3810,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0" dependencies = [ - "base64", + "base64 0.22.1", "der", "log", "native-tls", @@ -3034,7 +3827,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c" dependencies = [ - "base64", + "base64 0.22.1", "http 1.3.1", "httparse", "log", @@ -3208,6 +4001,376 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.221.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc8444fe4920de80a4fe5ab564fff2ae58b6b73166b89751f8c6c93509da32e5" +dependencies = [ + "leb128", + "wasmparser 0.221.3", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser 0.244.0", +] + +[[package]] +name = "wasmparser" +version = "0.221.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d06bfa36ab3ac2be0dee563380147a5b81ba10dd8885d7fbbc9eb574be67d185" +dependencies = [ + "bitflags", + "hashbrown 0.15.2", + "indexmap", + "semver", + "serde", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "indexmap", + "semver", +] + +[[package]] +name = "wasmprinter" +version = "0.221.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7343c42a97f2926c7819ff81b64012092ae954c5d83ddd30c9fcdefd97d0b283" +dependencies = [ + "anyhow", + "termcolor", + "wasmparser 0.221.3", +] + +[[package]] +name = "wasmtime" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11976a250672556d1c4c04c6d5d7656ac9192ac9edc42a4587d6c21460010e69" +dependencies = [ + "addr2line", + "anyhow", + "async-trait", + "bitflags", + "bumpalo", + "cc", + "cfg-if", + "encoding_rs", + "fxprof-processed-profile", + "gimli", + "hashbrown 0.14.5", + "indexmap", + "ittapi", + "libc", + "log", + "mach2", + "memfd", + "object 0.36.7", + "once_cell", + "paste", + "postcard", + "psm", + "pulley-interpreter", + "rayon", + "rustix 0.38.44", + "semver", + "serde", + "serde_derive", + "serde_json", + "smallvec", + "sptr", + "target-lexicon", + "trait-variant", + "wasm-encoder 0.221.3", + "wasmparser 0.221.3", + "wasmtime-asm-macros", + "wasmtime-cache", + "wasmtime-component-macro", + "wasmtime-component-util", + "wasmtime-cranelift", + "wasmtime-environ", + "wasmtime-fiber", + "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", + "wasmtime-math", + "wasmtime-slab", + "wasmtime-versioned-export-macros", + "wasmtime-winch", + "wat", + "windows-sys 0.59.0", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f178b0d125201fbe9f75beaf849bd3e511891f9e45ba216a5b620802ccf64f2" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "wasmtime-cache" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b1161c8f62880deea07358bc40cceddc019f1c81d46007bc390710b2fe24ffc" +dependencies = [ + "anyhow", + "base64 0.21.7", + "directories-next", + "log", + "postcard", + "rustix 0.38.44", + "serde", + "serde_derive", + "sha2", + "toml", + "windows-sys 0.59.0", + "zstd", +] + +[[package]] +name = "wasmtime-component-macro" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d74de6592ed945d0a602f71243982a304d5d02f1e501b638addf57f42d57dfaf" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn", + "wasmtime-component-util", + "wasmtime-wit-bindgen", + "wit-parser", +] + +[[package]] +name = "wasmtime-component-util" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707dc7b3c112ab5a366b30cfe2fb5b2f8e6a0f682f16df96a5ec582bfe6f056e" + +[[package]] +name = "wasmtime-cranelift" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366be722674d4bf153290fbcbc4d7d16895cc82fb3e869f8d550ff768f9e9e87" +dependencies = [ + "anyhow", + "cfg-if", + "cranelift-codegen", + "cranelift-control", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "gimli", + "itertools", + "log", + "object 0.36.7", + "smallvec", + "target-lexicon", + "thiserror 1.0.69", + "wasmparser 0.221.3", + "wasmtime-environ", + "wasmtime-versioned-export-macros", +] + +[[package]] +name = "wasmtime-environ" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdadc1af7097347aa276a4f008929810f726b5b46946971c660b6d421e9994ad" +dependencies = [ + "anyhow", + "cpp_demangle", + "cranelift-bitset", + "cranelift-entity", + "gimli", + "indexmap", + "log", + "object 0.36.7", + "postcard", + "rustc-demangle", + "semver", + "serde", + "serde_derive", + "smallvec", + "target-lexicon", + "wasm-encoder 0.221.3", + "wasmparser 0.221.3", + "wasmprinter", + "wasmtime-component-util", +] + +[[package]] +name = "wasmtime-fiber" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccba90d4119f081bca91190485650730a617be1fff5228f8c4757ce133d21117" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "rustix 0.38.44", + "wasmtime-asm-macros", + "wasmtime-versioned-export-macros", + "windows-sys 0.59.0", +] + +[[package]] +name = "wasmtime-jit-debug" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e7b61488a5ee00c35c8c22de707c36c0aecacf419a3be803a6a2ba5e860f56a" +dependencies = [ + "object 0.36.7", + "rustix 0.38.44", + "wasmtime-versioned-export-macros", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec5e8552e01692e6c2e5293171704fed8abdec79d1a6995a0870ab190e5747d1" +dependencies = [ + "anyhow", + "cfg-if", + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "wasmtime-math" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29210ec2aa25e00f4d54605cedaf080f39ec01a872c5bd520ad04c67af1dde17" +dependencies = [ + "libm", +] + +[[package]] +name = "wasmtime-slab" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb5821a96fa04ac14bc7b158bb3d5cd7729a053db5a74dad396cd513a5e5ccf" + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ff86db216dc0240462de40c8290887a613dddf9685508eb39479037ba97b5b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wasmtime-wasi" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d1be69bfcab1bdac74daa7a1f9695ab992b9c8e21b9b061e7d66434097e0ca4" +dependencies = [ + "anyhow", + "async-trait", + "bitflags", + "bytes", + "cap-fs-ext", + "cap-net-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "futures", + "io-extras", + "io-lifetimes", + "rustix 0.38.44", + "system-interface", + "thiserror 1.0.69", + "tokio", + "tracing", + "trait-variant", + "url", + "wasmtime", + "wiggle", + "windows-sys 0.59.0", +] + +[[package]] +name = "wasmtime-winch" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdbabfb8f20502d5e1d81092b9ead3682ae59988487aafcd7567387b7a43cf8f" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli", + "object 0.36.7", + "target-lexicon", + "wasmparser 0.221.3", + "wasmtime-cranelift", + "wasmtime-environ", + "winch-codegen", +] + +[[package]] +name = "wasmtime-wit-bindgen" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8358319c2dd1e4db79e3c1c5d3a5af84956615343f9f89f4e4996a36816e06e6" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "wit-parser", +] + +[[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 = "244.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e7b9f9e23311275920e3d6b56d64137c160cf8af4f84a7283b36cfecbf4acb" +dependencies = [ + "bumpalo", + "leb128fmt", + "memchr", + "unicode-width", + "wasm-encoder 0.244.0", +] + +[[package]] +name = "wat" +version = "1.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbf35b87ed352f9ab6cd0732abde5a67dd6153dfd02c493e61459218b19456fa" +dependencies = [ + "wast 244.0.0", +] + [[package]] name = "web-sys" version = "0.3.77" @@ -3227,6 +4390,48 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "wiggle" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9af35bc9629c52c261465320a9a07959164928b4241980ba1cf923b9e6751d" +dependencies = [ + "anyhow", + "async-trait", + "bitflags", + "thiserror 1.0.69", + "tracing", + "wasmtime", + "wiggle-macro", +] + +[[package]] +name = "wiggle-generate" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cf267dd05673912c8138f4b54acabe6bd53407d9d1536f0fadb6520dd16e101" +dependencies = [ + "anyhow", + "heck", + "proc-macro2", + "quote", + "shellexpand", + "syn", + "witx", +] + +[[package]] +name = "wiggle-macro" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c5c473d4198e6c2d377f3809f713ff0c110cab88a0805ae099a82119ee250c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wiggle-generate", +] + [[package]] name = "winapi" version = "0.3.9" @@ -3243,12 +4448,39 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "winch-codegen" +version = "29.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f849ef2c5f46cb0a20af4b4487aaa239846e52e2c03f13fa3c784684552859c" +dependencies = [ + "anyhow", + "cranelift-codegen", + "gimli", + "regalloc2", + "smallvec", + "target-lexicon", + "thiserror 1.0.69", + "wasmparser 0.221.3", + "wasmtime-cranelift", + "wasmtime-environ", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -3456,13 +4688,23 @@ checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.4" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" dependencies = [ "memchr", ] +[[package]] +name = "winx" +version = "0.36.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" +dependencies = [ + "bitflags", + "windows-sys 0.59.0", +] + [[package]] name = "wit-bindgen-rt" version = "0.39.0" @@ -3472,6 +4714,36 @@ dependencies = [ "bitflags", ] +[[package]] +name = "wit-parser" +version = "0.221.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "896112579ed56b4a538b07a3d16e562d101ff6265c46b515ce0c701eef16b2ac" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.221.3", +] + +[[package]] +name = "witx" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" +dependencies = [ + "anyhow", + "log", + "thiserror 1.0.69", + "wast 35.0.2", +] + [[package]] name = "write16" version = "1.0.0" @@ -3576,3 +4848,31 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/sentry_streams/Cargo.toml b/sentry_streams/Cargo.toml index 464d407c..4b0ed1e5 100644 --- a/sentry_streams/Cargo.toml +++ b/sentry_streams/Cargo.toml @@ -23,6 +23,8 @@ metrics = "0.24.0" metrics-exporter-dogstatsd = "0.9.0" rand = "0.8" sentry = "0.48.1" +wasmtime = { version = "29.0.0", default-features = true, features = ["component-model"] } +wasmtime-wasi = "29.0.0" [lib] name = "rust_streams" diff --git a/sentry_streams/sentry_streams/adapters/arroyo/rust_arroyo.py b/sentry_streams/sentry_streams/adapters/arroyo/rust_arroyo.py index ac3ae370..38ebcccb 100644 --- a/sentry_streams/sentry_streams/adapters/arroyo/rust_arroyo.py +++ b/sentry_streams/sentry_streams/adapters/arroyo/rust_arroyo.py @@ -62,6 +62,7 @@ Source, StreamSink, StreamSource, + WasmProcessor, ) from sentry_streams.pipeline.window import MeasurementUnit from sentry_streams.rust_streams import ( @@ -386,6 +387,9 @@ def map(self, step: Map[Any, Any], stream: Route) -> Route: """ Builds a map operator for the platform the adapter supports. """ + if isinstance(step, WasmProcessor): + return self._wasm_processor(step, stream) + assert ( stream.source in self.__consumers ), f"Stream starting at source {stream.source} not found when adding a map" @@ -439,6 +443,23 @@ def flat_map(self, step: FlatMap[Any, Any], stream: Route) -> Route: logger.info(f"Adding flatMap: {step.name} to pipeline") raise NotImplementedError + def _wasm_processor(self, step: WasmProcessor, stream: Route) -> Route: + self.__close_chain(stream) + assert ( + stream.source in self.__consumers + ), f"Stream starting at source {stream.source} not found when adding WasmProcessor" + + step_config: Mapping[str, Any] = self.steps_config.get(step.name, {}) + step.override_config(step_config) + step.validate() + + route = RustRoute(stream.source, stream.waypoints) + logger.info(f"Adding WasmProcessor: {step.name} to pipeline (module={step.module_path})") + self.__consumers[stream.source].add_step( + RuntimeOperator.WasmProcessor(route, step.module_path) + ) + return stream + def filter(self, step: Filter[Any], stream: Route) -> Route: """ Builds a filter operator for the platform the adapter supports. diff --git a/sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml b/sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml new file mode 100644 index 00000000..80d5f9f5 --- /dev/null +++ b/sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml @@ -0,0 +1,18 @@ +env: {} + +pipeline: + adapter_config: + arroyo: + write_healthcheck: true + segments: + - steps_config: + myinput: + starts_segment: true + bootstrap_servers: ["127.0.0.1:9092"] + topic: ingest-events + consumer_group: wasm-processor-example + wasm: + module_path: examples/wasm_guest/dist/plugin.wasm + mysink: + bootstrap_servers: ["127.0.0.1:9092"] + topic: processed-events diff --git a/sentry_streams/sentry_streams/examples/wasm_processor.py b/sentry_streams/sentry_streams/examples/wasm_processor.py new file mode 100644 index 00000000..c83c8639 --- /dev/null +++ b/sentry_streams/sentry_streams/examples/wasm_processor.py @@ -0,0 +1,17 @@ +from sentry_streams.pipeline.pipeline import ( + StreamSink, + WasmProcessor, + streaming_source, +) + +pipeline = streaming_source(name="myinput", stream_name="ingest-events") + +( + pipeline.apply( + WasmProcessor( + "wasm", + module_path="examples/wasm_guest/dist/plugin.wasm", + ) + ) + .sink(StreamSink("mysink", stream_name="processed-events")) +) diff --git a/sentry_streams/sentry_streams/pipeline/__init__.py b/sentry_streams/sentry_streams/pipeline/__init__.py index fe28502e..eca61740 100644 --- a/sentry_streams/sentry_streams/pipeline/__init__.py +++ b/sentry_streams/sentry_streams/pipeline/__init__.py @@ -11,6 +11,7 @@ Reducer, Serializer, StreamSink, + WasmProcessor, branch, streaming_source, ) @@ -28,6 +29,7 @@ "Reducer", "Serializer", "StreamSink", + "WasmProcessor", "branch", "streaming_source", ] diff --git a/sentry_streams/sentry_streams/pipeline/pipeline.py b/sentry_streams/sentry_streams/pipeline/pipeline.py index 4f13fec6..e9357637 100644 --- a/sentry_streams/sentry_streams/pipeline/pipeline.py +++ b/sentry_streams/sentry_streams/pipeline/pipeline.py @@ -423,6 +423,27 @@ def validate(self) -> None: TransformStep = FunctionTransform +@dataclass +class WasmProcessor(Transform[bytes, bytes]): + """ + A transform step that delegates message processing to a WASM component + loaded from ``module_path``. Input and output are raw bytes messages. + + Only supported by the Rust ``rust_arroyo`` adapter. + """ + + module_path: str + step_type: StepType = StepType.MAP + + def override_config(self, loaded_config: Mapping[str, Any]) -> None: + if loaded_config.get("module_path"): + self.module_path = str(loaded_config["module_path"]) + + def validate(self) -> None: + if not self.module_path: + raise ValueError("WasmProcessor.module_path must be non-empty") + + @dataclass class Map(FunctionTransform[TIn, TOut], Generic[TIn, TOut]): """ diff --git a/sentry_streams/sentry_streams/rust_streams.pyi b/sentry_streams/sentry_streams/rust_streams.pyi index 47c01511..7cedb168 100644 --- a/sentry_streams/sentry_streams/rust_streams.pyi +++ b/sentry_streams/sentry_streams/rust_streams.pyi @@ -143,6 +143,8 @@ class RuntimeOperator: ) -> Self: ... @classmethod def PythonAdapter(cls, route: Route, delegate_Factory: RustOperatorFactory) -> Self: ... + @classmethod + def WasmProcessor(cls, route: Route, module_path: str) -> Self: ... class ArroyoConsumer: def __init__( diff --git a/sentry_streams/src/lib.rs b/sentry_streams/src/lib.rs index b8819a2b..091c56fd 100644 --- a/sentry_streams/src/lib.rs +++ b/sentry_streams/src/lib.rs @@ -24,6 +24,7 @@ mod store_sinks; mod time_helpers; mod transformer; mod utils; +mod wasm_processor; mod watermark; #[doc(hidden)] diff --git a/sentry_streams/src/operators.rs b/sentry_streams/src/operators.rs index a368be15..14fd1024 100644 --- a/sentry_streams/src/operators.rs +++ b/sentry_streams/src/operators.rs @@ -3,6 +3,7 @@ use crate::broadcaster::Broadcaster; use crate::header_filter_step::build_header_int_filter; use crate::kafka_config::PyKafkaProducerConfig; use crate::python_operator::PythonAdapter; +use crate::wasm_processor::WasmProcessor as WasmProcessorStrategy; use crate::routers::build_router; use crate::routes::{Route, RoutedValue}; use crate::sinks::StreamSink; @@ -117,6 +118,12 @@ pub enum RuntimeOperator { route: Route, delegate_factory: Py, }, + /// Delegates message processing to a WASM component loaded from ``module_path``. + #[pyo3(name = "WasmProcessor")] + WasmProcessor { + route: Route, + module_path: String, + }, } pub fn build( @@ -229,6 +236,14 @@ pub fn build( let factory = traced_with_gil!(|py| { delegate_factory.clone_ref(py) }); Box::new(PythonAdapter::new(route.clone(), factory, next)) } + RuntimeOperator::WasmProcessor { + route, + module_path, + } => Box::new(WasmProcessorStrategy::new( + route.clone(), + module_path.clone(), + next, + )), RuntimeOperator::Broadcast { route, downstream_routes, diff --git a/sentry_streams/src/wasm_processor.rs b/sentry_streams/src/wasm_processor.rs new file mode 100644 index 00000000..a80aad58 --- /dev/null +++ b/sentry_streams/src/wasm_processor.rs @@ -0,0 +1,475 @@ +//! Arroyo processing strategy that delegates message processing to a WASM guest +//! component via wasmtime. + +use crate::messages::{ + into_pyraw, PyStreamingMessage, RawMessage, RoutedValuePayload, Watermark, WatermarkMessage, +}; +use crate::routes::{Route, RoutedValue}; +use crate::utils::traced_with_gil; +use anyhow::{Context, Result}; +use sentry_arroyo::processing::strategies::{ + merge_commit_request, CommitRequest, ProcessingStrategy, StrategyError, SubmitError, +}; +use sentry_arroyo::types::{Message, Partition, Topic}; +use std::collections::{BTreeMap, VecDeque}; +use std::path::Path; +use std::sync::Mutex; +use std::time::Duration; +use tracing::{debug, error, info, warn}; +use wasmtime::component::{Component, Linker, ResourceTable}; +use wasmtime::{Config, Engine, Store}; +use wasmtime_wasi::{WasiCtx, WasiCtxBuilder, WasiView}; + +wasmtime::component::bindgen!({ + world: "plugin", + path: "wit", + async: false, +}); + +struct HostCtx { + table: ResourceTable, + wasi: WasiCtx, + step_name: String, +} + +impl WasiView for HostCtx { + fn table(&mut self) -> &mut ResourceTable { + &mut self.table + } + + fn ctx(&mut self) -> &mut WasiCtx { + &mut self.wasi + } +} + +impl sentry_streams::processor::log::Host for HostCtx { + fn debug(&mut self, message: String) { + debug!(step = %self.step_name, "{message}"); + } + + fn info(&mut self, message: String) { + info!(step = %self.step_name, "{message}"); + } + + fn warn(&mut self, message: String) { + warn!(step = %self.step_name, "{message}"); + } + + fn error(&mut self, message: String) { + error!(step = %self.step_name, "{message}"); + } +} + +type WitMessage = exports::sentry_streams::processor::processor::Message; +type WitWatermark = exports::sentry_streams::processor::processor::Watermark; +type WitOutput = exports::sentry_streams::processor::processor::Output; + +fn committable_to_wit(committable: &BTreeMap) -> Vec<((String, u64), u64)> { + committable + .iter() + .map(|(partition, offset)| { + ( + (partition.topic.as_str().to_string(), partition.index as u64), + *offset, + ) + }) + .collect() +} + +fn committable_from_wit(committable: &[((String, u64), u64)]) -> BTreeMap { + committable + .iter() + .map(|((topic, index), offset)| { + ( + Partition { + topic: Topic::new(topic), + index: *index as u16, + }, + *offset, + ) + }) + .collect() +} + +fn watermark_to_wit(watermark: &Watermark) -> WitWatermark { + WitWatermark { + committable: committable_to_wit(&watermark.committable), + timestamp: watermark.timestamp as f64, + last_message_time: watermark.last_message_time.unwrap_or(0.0), + } +} + +fn wit_watermark_to_rust(wm: &WitWatermark) -> Watermark { + Watermark::with_last_message_time( + committable_from_wit(&wm.committable), + wm.timestamp as u64, + Some(wm.last_message_time), + ) +} + +fn extract_wit_message(payload: &RoutedValuePayload) -> Result { + match payload { + RoutedValuePayload::PyStreamingMessage(PyStreamingMessage::RawMessage { content }) => { + traced_with_gil!(|py| { + let raw = content.bind(py).borrow(); + Ok(WitMessage { + headers: raw.headers.clone(), + timestamp: raw.timestamp, + payload: raw.payload.clone(), + }) + }) + } + RoutedValuePayload::PyStreamingMessage(PyStreamingMessage::PyAnyMessage { content }) => { + traced_with_gil!(|py| { + let bound = content.bind(py); + let payload = bound.borrow(); + let bytes: Vec = match payload.payload.extract::>(py) { + Ok(b) => b, + Err(_) => match payload.payload.extract::<&[u8]>(py) { + Ok(b) => b.to_vec(), + Err(e) => { + return Err(anyhow::anyhow!( + "WasmProcessor requires bytes payload, got non-bytes PyAnyMessage: {e}" + )); + } + }, + }; + Ok(WitMessage { + headers: payload.headers.clone(), + timestamp: payload.timestamp, + payload: bytes, + }) + }) + } + RoutedValuePayload::WatermarkMessage(..) => { + anyhow::bail!("expected streaming message, got watermark"); + } + } +} + +fn wit_message_to_routed(route: &Route, msg: &WitMessage, schema: Option) -> RoutedValue { + let raw = RawMessage { + payload: msg.payload.clone(), + headers: msg.headers.clone(), + timestamp: msg.timestamp, + schema, + }; + let py_msg = traced_with_gil!(|py| { + PyStreamingMessage::RawMessage { + content: into_pyraw(py, raw).expect("into_pyraw"), + } + }); + RoutedValue { + route: route.clone(), + payload: RoutedValuePayload::PyStreamingMessage(py_msg), + } +} + +fn wit_output_to_message( + route: &Route, + output: WitOutput, + schema: Option, +) -> Message { + match output { + WitOutput::Msg(msg) => { + let routed = wit_message_to_routed(route, &msg, schema); + Message::new_any_message(routed, BTreeMap::new()) + } + WitOutput::Wm(wm) => { + let watermark = wit_watermark_to_rust(&wm); + let committable = watermark.committable.clone(); + let routed = RoutedValue { + route: route.clone(), + payload: RoutedValuePayload::WatermarkMessage(WatermarkMessage::Watermark( + watermark, + )), + }; + Message::new_any_message(routed, committable) + } + } +} + +struct WasmGuest { + store: Store, + bindings: Plugin, +} + +impl WasmGuest { + fn new(module_path: &str, step_name: &str) -> Result { + let path = Path::new(module_path); + if !path.exists() { + anyhow::bail!("WASM module not found at {}", module_path); + } + + let mut config = Config::new(); + config.wasm_component_model(true); + let engine = Engine::new(&config)?; + + let component = Component::from_file(&engine, path) + .with_context(|| format!("loading WASM component from {}", module_path))?; + + let mut linker = Linker::new(&engine); + wasmtime_wasi::add_to_linker_sync(&mut linker).context("linking WASI Preview 2")?; + Plugin::add_to_linker(&mut linker, |state: &mut HostCtx| state) + .context("linking plugin host imports")?; + + let wasi = WasiCtxBuilder::new().build(); + let host = HostCtx { + table: ResourceTable::new(), + wasi, + step_name: step_name.to_string(), + }; + let mut store = Store::new(&engine, host); + let bindings = Plugin::instantiate(&mut store, &component, &linker) + .context("instantiating WASM plugin")?; + + Ok(Self { store, bindings }) + } + + fn call_submit(&mut self, msg: WitMessage) -> Result<()> { + self.bindings + .sentry_streams_processor_processor() + .call_submit(&mut self.store, &msg) + .context("guest submit")?; + Ok(()) + } + + fn call_submit_watermark(&mut self, wm: WitWatermark) -> Result<()> { + self.bindings + .sentry_streams_processor_processor() + .call_submit_watermark(&mut self.store, &wm) + .context("guest submit_watermark")?; + Ok(()) + } + + fn call_poll(&mut self) -> Result> { + let outputs = self + .bindings + .sentry_streams_processor_processor() + .call_poll(&mut self.store) + .context("guest poll")?; + Ok(outputs.unwrap_or_default()) + } +} + +/// Single-threaded WASM processor strategy. +pub struct WasmProcessor { + route: Route, + schema: Option, + guest: Mutex, + next_strategy: Box>, + pending: VecDeque>, + commit_request_carried_over: Option, +} + +impl WasmProcessor { + pub fn new( + route: Route, + module_path: String, + next_strategy: Box>, + ) -> Self { + let step_name = route + .waypoints + .last() + .cloned() + .unwrap_or_else(|| route.source.clone()); + let guest = WasmGuest::new(&module_path, &step_name) + .unwrap_or_else(|e| panic!("failed to initialize WASM guest: {e:#}")); + Self { + route, + schema: None, + guest: Mutex::new(guest), + next_strategy, + pending: VecDeque::new(), + commit_request_carried_over: None, + } + } + + fn forward_pending(&mut self) -> Result<(), StrategyError> { + while let Some(msg) = self.pending.pop_front() { + let commit_request = self.next_strategy.poll()?; + self.commit_request_carried_over = + merge_commit_request(self.commit_request_carried_over.take(), commit_request); + match self.next_strategy.submit(msg) { + Err(SubmitError::MessageRejected( + sentry_arroyo::processing::strategies::MessageRejected { message }, + )) => { + self.pending.push_front(message); + break; + } + Err(SubmitError::InvalidMessage(invalid_message)) => { + return Err(invalid_message.into()); + } + Ok(()) => {} + } + } + Ok(()) + } + + fn poll_guest_and_forward(&mut self) -> Result<(), StrategyError> { + let outputs = { + let mut guest = self + .guest + .lock() + .expect("WasmProcessor guest mutex poisoned"); + guest.call_poll().map_err(|e| { + StrategyError::Other(Box::new(std::io::Error::other(e.to_string()))) + })? + }; + for output in outputs { + let msg = wit_output_to_message(&self.route, output, self.schema.clone()); + self.pending.push_back(msg); + } + self.forward_pending() + } +} + +impl ProcessingStrategy for WasmProcessor { + fn submit(&mut self, message: Message) -> Result<(), SubmitError> { + if self.route != message.payload().route { + return self.next_strategy.submit(message); + } + + let payload = &message.payload().payload; + if let RoutedValuePayload::WatermarkMessage(WatermarkMessage::Watermark(watermark)) = + payload + { + let wit_wm = watermark_to_wit(watermark); + let mut guest = self + .guest + .lock() + .expect("WasmProcessor guest mutex poisoned"); + if let Err(e) = guest.call_submit_watermark(wit_wm) { + tracing::error!("WASM guest submit_watermark failed: {e:#}"); + panic!("WASM guest submit_watermark failed: {e:#}"); + } + return Ok(()); + } + if let RoutedValuePayload::WatermarkMessage(WatermarkMessage::PyWatermark(..)) = payload { + panic!("PyWatermark should not be submitted to WasmProcessor"); + } + + let wit_msg = extract_wit_message(payload).unwrap_or_else(|e| { + tracing::error!("WasmProcessor message conversion failed: {e:#}"); + panic!("WasmProcessor message conversion failed: {e:#}"); + }); + let mut guest = self + .guest + .lock() + .expect("WasmProcessor guest mutex poisoned"); + if let Err(e) = guest.call_submit(wit_msg) { + tracing::error!("WASM guest submit failed: {e:#}"); + panic!("WASM guest submit failed: {e:#}"); + } + Ok(()) + } + + fn poll(&mut self) -> Result, StrategyError> { + self.poll_guest_and_forward()?; + let commit_request = self.next_strategy.poll()?; + Ok(merge_commit_request( + self.commit_request_carried_over.take(), + commit_request, + )) + } + + fn terminate(&mut self) { + self.next_strategy.terminate(); + } + + fn join(&mut self, timeout: Option) -> Result, StrategyError> { + self.poll_guest_and_forward()?; + let commit_request = self.next_strategy.join(timeout)?; + Ok(merge_commit_request( + self.commit_request_carried_over.take(), + commit_request, + )) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::fake_strategy::FakeStrategy; + use crate::messages::{RoutedValuePayload, Watermark}; + use crate::testutils::{build_routed_value, make_committable}; + use pyo3::IntoPyObjectExt; + use std::sync::{Arc, Mutex}; + + fn fixture_path() -> Option { + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("tests/fixtures/wasm_passthrough.wasm"); + if path.exists() { + Some(path.to_string_lossy().into_owned()) + } else { + None + } + } + + fn make_test_watermark(route: Route) -> Message { + let committable = make_committable(2, 0); + let watermark = Watermark::new(committable.clone(), 42); + let routed_watermark = RoutedValue { + route, + payload: RoutedValuePayload::WatermarkMessage(WatermarkMessage::Watermark(watermark)), + }; + Message::new_any_message(routed_watermark, committable) + } + + #[test] + fn test_wasm_passthrough_message() { + let Some(module_path) = fixture_path() else { + eprintln!("skipping test_wasm_passthrough_message: fixture not built"); + return; + }; + crate::testutils::initialize_python(); + traced_with_gil!(|py| { + let submitted_messages = Arc::new(Mutex::new(Vec::new())); + let submitted_watermarks = Arc::new(Mutex::new(Vec::new())); + let next_step = FakeStrategy::new( + submitted_messages.clone(), + submitted_watermarks.clone(), + false, + ); + + let route = Route::new("source1".to_string(), vec!["wasm".to_string()]); + let mut processor = + WasmProcessor::new(route.clone(), module_path, Box::new(next_step)); + + let routed = build_routed_value( + py, + b"hello".to_vec().into_py_any(py).unwrap(), + "source1", + vec!["wasm".to_string()], + ); + let committable = make_committable(1, 0); + let message = Message::new_any_message(routed, committable); + processor.submit(message).unwrap(); + processor.poll().unwrap(); + + let messages = submitted_messages.lock().unwrap(); + assert_eq!(messages.len(), 1); + }); + } + + #[test] + fn test_wasm_passthrough_watermark() { + let Some(module_path) = fixture_path() else { + eprintln!("skipping test_wasm_passthrough_watermark: fixture not built"); + return; + }; + crate::testutils::initialize_python(); + let submitted_messages = Arc::new(Mutex::new(Vec::new())); + let submitted_watermarks = Arc::new(Mutex::new(Vec::new())); + let next_step = FakeStrategy::new(submitted_messages, submitted_watermarks.clone(), false); + + let route = Route::new("source1".to_string(), vec!["wasm".to_string()]); + let mut processor = WasmProcessor::new(route.clone(), module_path, Box::new(next_step)); + + let watermark = make_test_watermark(route); + processor.submit(watermark).unwrap(); + processor.poll().unwrap(); + + assert!(!submitted_watermarks.lock().unwrap().is_empty()); + } +} diff --git a/sentry_streams/tests/fixtures/wasm_passthrough.wasm b/sentry_streams/tests/fixtures/wasm_passthrough.wasm new file mode 100644 index 0000000000000000000000000000000000000000..0407534b1d7b642e3eed458cd6c849b64d84953c GIT binary patch literal 76109 zcmdqK378#Mb?;lds?L16`^c7M$&&3lN5Yn|CAH?k7*qle!p4kd2!qv@T6VXjZmGK^ z+cyTaY%v>bh9nMC?1W%57z}X;5Qc^rLlOec3lK;MLqZbnO&&NmK=_#Se*d+r&d}X5 zhRb{J`(pX@sj5A#z2>#{u6=@`$pd|X3rZKc9dR5Kh9@S*CnD#r3*2@WPY&w?KR zIP>`jhNrF@-}6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j1`i#{fCCnS`FwT#J zxg<*y!Eu1q0=!iuaMKnz-G{E9zN0N|#8Q}l){=&uEWXw(T|q)IEO~p08YI{o`L|)#1D%j)^*0wyy{a=qqhrnKF1yNy8m8&ny%Zx^UcWN5j7Ow z1RmzqK=73j%_o9EwWzT)Y%-{cVP^tU(Uol+MF&s}@7ID45$pPMd~}?+gw~)VAuV{6 zUhL&0KQW@7z~4VW@7c~G#!4E++8)C?f;0;4a40k`o)RRU<3bCbCHV^u-UecH0xwJ` zP=`Zf7zq-75Cdg+puIGS;328?Dd;;A8uQnuHjh4qUSq)mxcG^wK10h{s1*L!j+fM??5*i{8=@+W0*}JEC+ZYhgx`iE6p4G{>XN0gEYZr4NIN@mms&qc|MpAgzHJLGoX4Zk*K%?&1b{6V3ebb{`* z=@1j4L&8*95PPVsac%tW4!&eu!b%zWwF5LolbZ)IMN{L)(5lxyGIbvjhb-nz*AI7? zcf>}F#k^_!F%WdBRhrX(RBQ9%_;&rSZeHANd)6KHrm)}j9%twYf}>f2bTJM7VqxGEwJH`x@F@RwAuZ{hLf8QfDNZ;q^odrJTv*uFb?utr`efmruAuKGXRW0Zny zdqP%zeRO{*9lH(E#`i+b#Ne9!z+QCs6hx~oK7wi+(@u2X;)Pw zB%iZ0$4Q}_Xy4to+jf None: + step = WasmProcessor("wasm", module_path="") + with pytest.raises(ValueError, match="module_path"): + step.validate() + + +def test_wasm_processor_override_config_module_path() -> None: + step = WasmProcessor("wasm", module_path="default.wasm") + step.override_config({"module_path": "override.wasm"}) + assert step.module_path == "override.wasm" + + +def test_wasm_processor_pipeline_builds() -> None: + pipeline = streaming_source("myinput", "events") + ( + pipeline.apply(WasmProcessor("wasm", module_path="tests/fixtures/wasm_passthrough.wasm")) + .sink(StreamSink("mysink", stream_name="out")) + ) + assert "wasm" in pipeline.steps diff --git a/sentry_streams/tests/wasm_passthrough_guest/.cargo/config.toml b/sentry_streams/tests/wasm_passthrough_guest/.cargo/config.toml new file mode 100644 index 00000000..44634ff0 --- /dev/null +++ b/sentry_streams/tests/wasm_passthrough_guest/.cargo/config.toml @@ -0,0 +1,5 @@ +[build] +target = "wasm32-wasip2" + +[target.wasm32-wasip2] +rustflags = ["-C", "target-feature=+bulk-memory"] diff --git a/sentry_streams/tests/wasm_passthrough_guest/Cargo.lock b/sentry_streams/tests/wasm_passthrough_guest/Cargo.lock new file mode 100644 index 00000000..c5786f02 --- /dev/null +++ b/sentry_streams/tests/wasm_passthrough_guest/Cargo.lock @@ -0,0 +1,806 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "auditable-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7bf8143dfc3c0258df908843e169b5cc5fcf76c7718bd66135ef4a9cd558c5" +dependencies = [ + "semver", + "serde", + "serde_json", + "topological-sort", +] + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "spdx" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e17e880bafaeb362a7b751ec46bdc5b61445a188f80e0606e68167cd540fa3" +dependencies = [ + "smallvec", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "topological-sort" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea68304e134ecd095ac6c3574494fc62b909f416c4fca77e440530221e549d3d" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "wasm-encoder" +version = "0.227.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bb72f02e7fbf07183443b27b0f3d4144abf8c114189f2e088ed95b696a7822" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.227.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce1ef0faabbbba6674e97a56bee857ccddf942785a336c8b47b42373c922a91d" +dependencies = [ + "anyhow", + "auditable-serde", + "flate2", + "indexmap", + "serde", + "serde_derive", + "serde_json", + "spdx", + "url", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasm-passthrough-guest" +version = "0.1.0" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasmparser" +version = "0.227.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f51cad774fb3c9461ab9bccc9c62dfb7388397b5deda31bf40e8108ccd678b2" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "wit-bindgen" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10fb6648689b3929d56bbc7eb1acf70c9a42a29eb5358c67c10f54dbd5d695de" +dependencies = [ + "wit-bindgen-rt", + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92fa781d4f2ff6d3f27f3cc9b74a73327b31ca0dc4a3ef25a0ce2983e0e5af9b" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rt" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db52a11d4dfb0a59f194c064055794ee6564eb1ced88c25da2cf76e50c5621" +dependencies = [ + "bitflags", + "futures", + "once_cell", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d0809dc5ba19e2e98661bf32fc0addc5a3ca5bf3a6a7083aa6ba484085ff3ce" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad19eec017904e04c60719592a803ee5da76cb51c81e3f6fbf9457f59db49799" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.227.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "635c3adc595422cbf2341a17fb73a319669cc8d33deed3a48368a841df86b676" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.227.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf445ed5157046e4baf56f9138c124a0824d4d1657e7204d71886ad8ce2fc11" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "yoke" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/sentry_streams/tests/wasm_passthrough_guest/Cargo.toml b/sentry_streams/tests/wasm_passthrough_guest/Cargo.toml new file mode 100644 index 00000000..d54ecc1b --- /dev/null +++ b/sentry_streams/tests/wasm_passthrough_guest/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "wasm-passthrough-guest" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +wit-bindgen = "0.41.0" diff --git a/sentry_streams/tests/wasm_passthrough_guest/Makefile b/sentry_streams/tests/wasm_passthrough_guest/Makefile new file mode 100644 index 00000000..c7265e28 --- /dev/null +++ b/sentry_streams/tests/wasm_passthrough_guest/Makefile @@ -0,0 +1,5 @@ +.PHONY: build + +build: + CARGO_TARGET_DIR=./target cargo build --release + cp target/wasm32-wasip2/release/wasm_passthrough_guest.wasm ../fixtures/wasm_passthrough.wasm diff --git a/sentry_streams/tests/wasm_passthrough_guest/README.md b/sentry_streams/tests/wasm_passthrough_guest/README.md new file mode 100644 index 00000000..0bd42368 --- /dev/null +++ b/sentry_streams/tests/wasm_passthrough_guest/README.md @@ -0,0 +1,10 @@ +# WASM passthrough test guest + +Minimal Rust component used as `tests/fixtures/wasm_passthrough.wasm` for `WasmProcessor` unit tests. +It does not embed Python (unlike the `componentize-py` guest under `examples/wasm_guest/`). + +## Build + +```bash +make -C tests/wasm_passthrough_guest build +``` diff --git a/sentry_streams/tests/wasm_passthrough_guest/src/lib.rs b/sentry_streams/tests/wasm_passthrough_guest/src/lib.rs new file mode 100644 index 00000000..f48c8214 --- /dev/null +++ b/sentry_streams/tests/wasm_passthrough_guest/src/lib.rs @@ -0,0 +1,44 @@ +//! Minimal passthrough guest for host unit tests (no embedded Python). + +wit_bindgen::generate!({ + world: "plugin", + path: "../../wit", +}); + +use std::cell::RefCell; + +struct Component; + +thread_local! { + static PENDING: RefCell> = + RefCell::new(Vec::new()); +} + +impl exports::sentry_streams::processor::processor::Guest for Component { + fn submit(msg: exports::sentry_streams::processor::processor::Message) { + PENDING.with(|p| { + p.borrow_mut() + .push(exports::sentry_streams::processor::processor::Output::Msg(msg)); + }); + } + + fn submit_watermark(wm: exports::sentry_streams::processor::processor::Watermark) { + PENDING.with(|p| { + p.borrow_mut() + .push(exports::sentry_streams::processor::processor::Output::Wm(wm)); + }); + } + + fn poll() -> Option> { + PENDING.with(|p| { + let mut pending = p.borrow_mut(); + if pending.is_empty() { + None + } else { + Some(std::mem::take(&mut *pending)) + } + }) + } +} + +export!(Component); diff --git a/sentry_streams/uv.lock b/sentry_streams/uv.lock index cce7bd35..f1ffb3e4 100644 --- a/sentry_streams/uv.lock +++ b/sentry_streams/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 2 requires-python = ">=3.11" [[package]] @@ -897,7 +897,7 @@ wheels = [ [[package]] name = "sentry-streams" -version = "0.0.52" +version = "0.0.55" source = { editable = "." } dependencies = [ { name = "click" }, diff --git a/sentry_streams/wit/processor.wit b/sentry_streams/wit/processor.wit new file mode 100644 index 00000000..ab9d4710 --- /dev/null +++ b/sentry_streams/wit/processor.wit @@ -0,0 +1,36 @@ +package sentry-streams:processor; + +interface log { + debug: func(message: string); + info: func(message: string); + warn: func(message: string); + error: func(message: string); +} + +interface processor { + record message { + headers: list>>, + timestamp: f64, + payload: list, + } + + record watermark { + committable: list, u64>>, + timestamp: f64, + last-message-time: f64, + } + + variant output { + msg(message), + wm(watermark), + } + + submit: func(msg: message); + submit-watermark: func(wm: watermark); + poll: func() -> option>; +} + +world plugin { + import log; + export processor; +} From 5f95879f7f87778403c245a85e2ba2302fe18734 Mon Sep 17 00:00:00 2001 From: Filippo Pacifici Date: Thu, 21 May 2026 18:07:45 -0700 Subject: [PATCH 2/2] Fix pipeline --- sentry_streams/sentry_streams/adapters/stream_adapter.py | 6 ++++-- .../sentry_streams/deployment_config/wasm_processor.yaml | 6 ++---- sentry_streams/sentry_streams/examples/wasm_processor.py | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sentry_streams/sentry_streams/adapters/stream_adapter.py b/sentry_streams/sentry_streams/adapters/stream_adapter.py index f034771b..0a584ae4 100644 --- a/sentry_streams/sentry_streams/adapters/stream_adapter.py +++ b/sentry_streams/sentry_streams/adapters/stream_adapter.py @@ -31,6 +31,7 @@ Source, Step, StepType, + WasmProcessor, ) from sentry_streams.pipeline.window import MeasurementUnit @@ -173,6 +174,7 @@ def __init__(self, runtime_adapter: StreamAdapter[StreamT, StreamSinkT]): def translate_step( self, step: Step, stream: Optional[StreamT] = None ) -> Mapping[str, Union[StreamT, StreamSinkT]]: + step_name = step.name if isinstance(step, ComplexStep): overrides = self.adapter.complex_step_override() @@ -183,7 +185,6 @@ def translate_step( assert hasattr(step, "step_type") step_type = step.step_type - if step_type is StepType.SOURCE: assert isinstance(step, Source) return {step_name: self.adapter.source(step)} @@ -193,7 +194,8 @@ def translate_step( return {step_name: self.adapter.sink(step, stream)} elif step_type is StepType.MAP: - assert isinstance(step, Map) and stream is not None + # TODO: This is bad. Do not merge with this. + assert isinstance(step, (Map, WasmProcessor)) and stream is not None return {step_name: self.adapter.map(step, stream)} elif step_type is StepType.FLAT_MAP: diff --git a/sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml b/sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml index 80d5f9f5..93a8987d 100644 --- a/sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml +++ b/sentry_streams/sentry_streams/deployment_config/wasm_processor.yaml @@ -9,10 +9,8 @@ pipeline: myinput: starts_segment: true bootstrap_servers: ["127.0.0.1:9092"] - topic: ingest-events - consumer_group: wasm-processor-example wasm: - module_path: examples/wasm_guest/dist/plugin.wasm + module_path: /Users/filippopacifici/code/streams/examples/wasm_guest/dist/plugin.wasm mysink: bootstrap_servers: ["127.0.0.1:9092"] - topic: processed-events + topic: processed-profiles diff --git a/sentry_streams/sentry_streams/examples/wasm_processor.py b/sentry_streams/sentry_streams/examples/wasm_processor.py index c83c8639..c5ae0dcb 100644 --- a/sentry_streams/sentry_streams/examples/wasm_processor.py +++ b/sentry_streams/sentry_streams/examples/wasm_processor.py @@ -4,14 +4,13 @@ streaming_source, ) -pipeline = streaming_source(name="myinput", stream_name="ingest-events") +pipeline = streaming_source(name="myinput", stream_name="ingest-metrics") ( pipeline.apply( WasmProcessor( "wasm", - module_path="examples/wasm_guest/dist/plugin.wasm", + module_path="/Users/filippopacifici/code/streams/examples/wasm_guest/dist/plugin.wasm", ) - ) - .sink(StreamSink("mysink", stream_name="processed-events")) + ).sink(StreamSink("mysink", stream_name="processed-profiles")) )