We want to use Sentry in a WASM environment (more specifically, the wasm32-wasip1 target). The Rust SDK almost works perfectly, except for the use of threads in SessionFlusher. I have created a fork for now to work around this, by setting the worker field of the flusher to None if on a WASM target. The diff is here: https://github.com/getsentry/sentry-rust/compare/master...pepperoni505:sentry-rust:master
Ultimately, I want to contribute to the upstream repo but I don't think my approach is a good one. From my understanding, the flusher is not "essential". Is this correct? Depending on the answer, would the flusher perhaps be better gated behind a flush feature given that some WASM targets do have threading (e.g. https://doc.rust-lang.org/rustc/platform-support/wasm32-wasip1-threads.html)
Official Sentry SDK for Rust. Contribute to getsentry/sentry-rust development by creating an account on GitHub.