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

Output receiver for dumping state #110

Merged
merged 3 commits into from
Mar 28, 2023
Merged

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Mar 28, 2023

No description provided.

.expect("writing to string should succeed");
let (last, most) = state
.split_last()
.expect("state should always have at least one entry");
Copy link
Member

Choose a reason for hiding this comment

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

Not sure I follow why you are splitting this and writing the last separately. Can you clarify?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the last one doesn't get a comma :). It's just a silly way of handling the manual conversion to JSON. The nice part about this division is that the Receiver will get called with the Rust structures, and then it's totally up to the code in the wasm level to decide how it wants to serialize that.

@swernli
Copy link
Collaborator Author

swernli commented Mar 28, 2023

I have one more change I want to update quickly to make it easier to use, then I will merge.

@swernli swernli merged commit 15fbf47 into billt/wasm-eval Mar 28, 2023
@swernli swernli deleted the swernli/wasm-eval branch March 28, 2023 17:36
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.

None yet

2 participants