JS <=> Rust worker streaming

Hi I'm trying to calling from JS service to Rust service using RPC. the RPC output (and input) is limited in 1MB to I have to use stream to bypass the limit I tried with
let stream1 = str_to_readable_stream(String::from_utf8(out).unwrap().as_str());
let stream = wasm_streams::ReadableStream::from_raw(stream1);
Ok(ByteStream { inner: stream })
let stream1 = str_to_readable_stream(String::from_utf8(out).unwrap().as_str());
let stream = wasm_streams::ReadableStream::from_raw(stream1);
Ok(ByteStream { inner: stream })
However I always getting "The destination execution context for this RPC was canceled while the call was still running.". Has anyone experienced this?
1 Reply
an
anOP•3w ago
also tried Ok(str_to_readable_stream(String::from_utf8(out).unwrap().as_str())) or Ok(wasm_streams::ReadableStream::from_raw(stream1)) but doesn't work either still looking for solution this, stuck for a week 😭 i'm so bad at rust

Did you find this page helpful?