-
Notifications
You must be signed in to change notification settings - Fork 38
feat: native streams #1365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: native streams #1365
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sgammon
reviewed
Apr 12, 2025
Member
sgammon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs and approach look solid
packages/graalvm-js/src/main/resources/META-INF/elide/embedded/runtime/js/runtime.current.json
Outdated
Show resolved
Hide resolved
.../main/kotlin/elide/runtime/gvm/internals/intrinsics/js/webstreams/ReadableStreamIntrinsic.kt
Show resolved
Hide resolved
packages/graalvm/src/main/kotlin/elide/runtime/intrinsics/js/stream/WritableStreamSink.kt
Show resolved
Hide resolved
packages/graalvm/src/main/kotlin/elide/runtime/node/fs/NodeFilesystem.kt
Outdated
Show resolved
Hide resolved
packages/graalvm/src/main/kotlin/elide/runtime/node/fs/NodeFilesystem.kt
Outdated
Show resolved
Hide resolved
Member
CI failuresFeel free to run Format with |
Closed
1d36241 to
9d8869e
Compare
727b582 to
b3e8ed0
Compare
b3e8ed0 to
d89036e
Compare
d89036e to
eb11c36
Compare
d2a0195 to
29b9e5d
Compare
Signed-off-by: Dario Valdespino <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Dario Valdespino <[email protected]>
Signed-off-by: Dario Valdespino <[email protected]>
Signed-off-by: Dario Valdespino <[email protected]>
Signed-off-by: Dario Valdespino <[email protected]>
Signed-off-by: Dario Valdespino <[email protected]>
Signed-off-by: Dario Valdespino <[email protected]>
Signed-off-by: Dario Valdespino <[email protected]>
29b9e5d to
d41a8ca
Compare
sgammon
approved these changes
May 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Introduces a pure-Kotlin implementation of the Web Streams standard, meant to replace the polyfills currently in place.
The implementation is functional but far from optimal, as it was made to be as close as possible to the specification, which resulted in JavaScript-style code that does not fully utilize the capabilities of Kotlin. In the future, a more optimal and streamlined (pun intended) implementation will be added, likely using coroutine primitives such as channels to avoid the current boilerplate.
ReadableStreamSourcewrapperWritableStreamSinkwrapperTransformStreamTransformerwrapperNote
A companion PR at runtime/382 removes the polyfill from the runtime image.