datastream/javascript/async
JavaScript-only async edge adapters.
The cross-target Stream(a) core is synchronous and pull-based:
each pull either yields the next element immediately or reports
Done. That contract keeps the core small and predictable across
Erlang and JavaScript, but it also means a true JavaScript
AsyncIterable(a) cannot be represented as a Stream(a) without
buffering or polling.
The official boundary is therefore:
- async input stays in host JavaScript until it has been reduced to
a bounded value or batch, then enters the core through the normal
constructors (
source.once,source.from_list,source.from_bit_array,source.resource, …); - synchronous
Stream(a)pipelines leave the core throughto_async_iterable, which exposes them tofor await ... ofand other host-side async consumers.
This keeps the core honest about its synchronous pull contract while still giving JavaScript applications a first-party interop point.
Values
pub const javascript_only_marker: String
Sentinel value documenting that this module is JavaScript-only.