bevyengine / bevyengine/bevy

`ConditionalSendStream` to match `ConditionalSendFuture`

Open
#22,093 0 comments 0 reactions 0 assignees View on GitHub
A-Assets A-Tasks C-Feature D-Async D-Straightforward S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Web and native stream interoperability

## What solution would you like?

Literally

```rust
pub trait ConditionalSendStream: Stream + ConditionalSend {}

impl ConditionalSendStream for T {}
```

## What alternative(s) have you considered?

Writing it myself, which I did

## Additional context

Stream support on web seems pretty important, especially since there's new work going into async, and streams are basically async iterators.

My specific use-case is to stream data from an AI via an LLM serving SSE content over http, and have that work on WASM.

Here is my implementation in my own crate: https://github.com/loopystudios/bevy_async_task/pull/16/changes#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R37-R49

Contributor guide

Open the contributing guide

Research direction

Locate the existing ConditionalSendFuture trait and its surrounding implementation or tests, then compare the requested stream trait with that API. The work is complete when the equivalent ConditionalSendStream abstraction compiles and supports Stream values across web and native targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.