Conversation
- Upgrade Go version from 1.22 to 1.24.0 - Update wazero dependency from v1.7.0 to v1.9.0 - Update corresponding go.sum entries
This commit updates the project to use standard Go's WebAssembly support instead of TinyGo: - Replace TinyGo-specific build constraints with `wasip1` - Update Makefile to use standard Go Wasm compilation - Modify plugin initialization to use `init()` instead of `main()` - Update memory management functions - Replace `//export` with `//go:wasmexport` - Update README and documentation references - Regenerate protobuf files with updated protoc version The changes enable broader compatibility with Go's native Wasm support while maintaining the existing plugin architecture.
…parsing This commit adds a new test case for a WebAssembly plugin using standard Go's JSON parsing and host function capabilities: - Implement a new test function `TestStd` in host_functions_test.go - Create a new plugin implementation in plugin-std/plugin.go - Demonstrate JSON unmarshaling and string formatting in a Wasm plugin - Use `WithStdout` to enable standard output handling - Verify plugin interaction with a sample greeting scenario
Clean up README by removing outdated JSON parsing notes specific to TinyGo, including: - Remove section about JSON parsing limitations - Delete links to JSON parsing libraries - Remove reference to JSON parsing example link
thaJeztah
referenced
this pull request
in containerd/nri
Aug 25, 2025
Signed-off-by: Sascha Grunert <sgrunert@redhat.com> Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com> Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR updates the plugin system to support native Go plugins using WASI (wasip1) instead of relying on TinyGo. With Go 1.24+, we can now compile Go code directly to WebAssembly with WASI reactor support, eliminating the need for TinyGo as an intermediate compiler.
Description
Go 1.24 introduced improved WebAssembly support with the reactor and
//go:wasmexportsupport, allowing us to compile Go code directly to Wasm. This PR makes the following changes:tinygo buildtoGOOS=wasip1 GOARCH=wasm go buildtinygo.wasmtowasip1//exportto//go:wasmexportThese changes simplify the plugin development process by allowing developers to use the standard Go toolchain without requiring TinyGo, while maintaining all the benefits of WebAssembly-based plugins.