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

Add bindings for the pinned metrics #526

Merged
merged 20 commits into from
Jun 27, 2024
Merged

Add bindings for the pinned metrics #526

merged 20 commits into from
Jun 27, 2024

Conversation

aumetra
Copy link
Member

@aumetra aumetra commented Mar 18, 2024

Add Go FFI bindings for the new pinned metrics. Uses MessagePack as the encoding format for complex types across the boundary.

Follow-up to CosmWasm/cosmwasm#2034

(This is me whipping out my rusty (haha, funny pun) Go skills from around (if not before) Go 1.11)


TODO:

  • Tests on Go side

@aumetra
Copy link
Member Author

aumetra commented Mar 19, 2024

This PR also adds a Nix flake. I can remove it again if it's not wanted in-tree, I just used it to set up a Go development environment quickly. Installing everything manually would have taken me longer, so a few lines of Nix and a nix develop later made that way quicker

@aumetra aumetra force-pushed the aw/pinned-metrics branch 3 times, most recently from 3fb2576 to d562f89 Compare March 19, 2024 12:37
@aumetra aumetra marked this pull request as ready for review March 19, 2024 12:50
@aumetra aumetra requested a review from webmaster128 March 19, 2024 12:50
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Very nice. Just the encoding question and some minor ideas here

libwasmvm/src/cache.rs Outdated Show resolved Hide resolved
types/checksum.go Show resolved Hide resolved
libwasmvm/src/cache.rs Outdated Show resolved Hide resolved
types/types.go Outdated Show resolved Hide resolved
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Looks good. Let's wait for a 2.1 pre-release tag before we merge this

types/checksum.go Show resolved Hide resolved
@webmaster128 webmaster128 added this to the 2.1.0 milestone Mar 27, 2024
@chipshort
Copy link
Collaborator

The 2.1.0-rc.1 is released now and merged on main, so this can be updated to that.

@aumetra aumetra force-pushed the aw/pinned-metrics branch from 505bf39 to cfd0f16 Compare June 26, 2024 10:06
@aumetra
Copy link
Member Author

aumetra commented Jun 26, 2024

@chipshort Rebased on main

types/types.go Outdated Show resolved Hide resolved
Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

Nice. I just don't recall anymore what the reason behind the comment was

libwasmvm/src/cache.rs Outdated Show resolved Hide resolved
@aumetra
Copy link
Member Author

aumetra commented Jun 26, 2024

Okay, I finally figured it out. I really don't know Go well enough..
Basically, our previous MessagePack library in Go didn't like the new format. But doesn't matter because this new library doesn't care and is actually faster.

Copy link
Collaborator

@chipshort chipshort left a comment

Choose a reason for hiding this comment

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

Code looks good, just wondering about the flake

flake.nix Outdated Show resolved Hide resolved
types/checksum.go Show resolved Hide resolved
Copy link
Collaborator

@chipshort chipshort left a comment

Choose a reason for hiding this comment

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

LGTM

@chipshort chipshort merged commit 39c9e09 into main Jun 27, 2024
14 checks passed
@chipshort chipshort deleted the aw/pinned-metrics branch June 27, 2024 14:51
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.

3 participants