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

[x/programs] migrate wasm runtime to wasmtime and refactor for VM integration #477

Merged
merged 49 commits into from
Oct 6, 2023

Conversation

hexfusion
Copy link
Contributor

@hexfusion hexfusion commented Sep 18, 2023

This PR replaces wazero with wasmtime for the runtime engine.

TODO

  • Replace and extend meter test
  • Add support for precompiling wasm and bench
  • Update removed examples to work with new runtime
  • Remove Wasi preview support
  • Improve UX to only require unsigned ints similar to wazero

@hexfusion hexfusion force-pushed the wasmtime branch 2 times, most recently from b5684c8 to e43edfb Compare September 20, 2023 02:15
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
}

// stop the runtime to prevent further execution
rt.Stop()
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

"github.com/ava-labs/hypersdk/x/programs/runtime"
)

func newKeyPtr(ctx context.Context, key ed25519.PublicKey, runtime runtime.Runtime) (uint64, error) {
Copy link
Contributor

@patrick-ogrady patrick-ogrady Oct 5, 2023

Choose a reason for hiding this comment

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

We'll turn ed25519.PublicKey into a new type soon but good enough for now (will become "short bytes")

richardpringle
richardpringle previously approved these changes Oct 6, 2023
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
Signed-off-by: Sam Batschelet <sam.batschelet@avalabs.org>
@patrick-ogrady patrick-ogrady merged commit 8ecd682 into main Oct 6, 2023
34 of 45 checks passed
@patrick-ogrady patrick-ogrady deleted the wasmtime branch October 6, 2023 21:37
@hexfusion hexfusion changed the title [x/programs] migrate to wasm runtime to wasmtime and refactor for VM integration [x/programs] migrate wasm runtime to wasmtime and refactor for VM integration Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants