Skip to content

Conversation

@jenniferwills
Copy link
Contributor

This PR adds support for using a string with a byte limit as the stdout and stderr for WasiCtx and WasiCtxBuilder.

Usage:

stdout_str = ""
stderr_str = ""
WasiCtxBuilder.new
          .inherit_stdin()
          .set_stdout_buffer(stdout_str, 50000)
          .set_stderr_buffer(stderr_str, 50000)
          .build

Copy link
Member

@saulecabrera saulecabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! I left a couple of suggestions and comments before landing this.

Copy link
Member

@saulecabrera saulecabrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for iterating on this, this looks good to me. I'm not sure what's going on with the 3.0 runners though, I don't think it's related to this PR. I'll take a look.

@saulecabrera
Copy link
Member

Note on the runners: 3.0 is no longer part of the stable-ruby-versions that are fetched by oxidize-rb/actions.

From: https://github.com/oxidize-rb/actions/blob/main/fetch-ci-data/evaluate.rb#L54

["3.1","3.2","3.3","head"]

@saulecabrera saulecabrera merged commit 3e9485b into bytecodealliance:main Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants