Closed
Description
Currently Readable & Writable streams are only available from a polyfilled JavScript module and is not used inside the SDK or for Fetch calls for performance and latency reasons.
LLRT should implement Readable-, Writable-, Duplex- and Transfer streams nativly in Rust. This would allow performant stream processing, increase throughput and be more memory efficient as users can pipe data through streams.
However, the streams API is gigantic. The polyfilled streams module is almost 6500 lines of JS supporting a lot of edge cases. There is also some difference between Node.js Streams and WebStreams.
A very basic initial implementation is currently implemented for child_process
and socket
module that can be expanded to support a richer Streams API.