Skip to content
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

Support encoding streams in the cli #387

Merged
merged 4 commits into from
Aug 29, 2024
Merged

Support encoding streams in the cli #387

merged 4 commits into from
Aug 29, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Aug 28, 2024

What

Support encoding streams in the cli.

Why

So that it is possible to pipe streams of XDR values to the CLI encode command and get out a stream of encoded XDR. Useful for building valid contract spec entries for WASMs using JSON.

You might also notice that stream base64 format is not supported for outputting. It would require more significant refactoring of this area of code to support that, and nothing in this PR does anything new to preclude doing that in the future, so I'm deferring it since I don't need it in this moment.

Dependent on:

@leighmcculloch leighmcculloch marked this pull request as ready for review August 28, 2024 23:21
@@ -96,6 +96,9 @@ impl Default for InputFormat {
pub enum OutputFormat {
Single,
SingleBase64,
Stream,
// TODO: StreamBase64,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to open issues for these?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could, but there is no pressing need for these things. So I think leaving the TODOs here as a way to signal if that feature is added here's the area to add it is okay. But I can also remove the TODOs too.

Copy link
Member Author

Choose a reason for hiding this comment

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

@leighmcculloch leighmcculloch added this pull request to the merge queue Aug 29, 2024
Merged via the queue into main with commit 1746499 Aug 29, 2024
11 checks passed
@leighmcculloch leighmcculloch deleted the encode-stream branch August 29, 2024 01:19
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