mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 03:54:01 +00:00
wasi preview 2 support (#4027)
* all: wasip2 support Co-authored-by: Randy Reddig <randy.reddig@fastly.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
// This file exists for testing this package without WebAssembly,
|
||||
// allowing empty function bodies with a //go:wasmimport directive.
|
||||
// See https://pkg.go.dev/cmd/compile for more information.
|
||||
@@ -0,0 +1,19 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
//go:build !wasip1
|
||||
|
||||
package run
|
||||
|
||||
import (
|
||||
"github.com/ydnar/wasm-tools-go/cm"
|
||||
)
|
||||
|
||||
// Exports represents the caller-defined exports from "wasi:cli/run@0.2.0".
|
||||
var Exports struct {
|
||||
// Run represents the caller-defined, exported function "run".
|
||||
//
|
||||
// Run the program.
|
||||
//
|
||||
// run: func() -> result
|
||||
Run func() (result cm.Result)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
//go:build !wasip1
|
||||
|
||||
// Package run represents the exported interface "wasi:cli/run@0.2.0".
|
||||
package run
|
||||
|
||||
import (
|
||||
"github.com/ydnar/wasm-tools-go/cm"
|
||||
)
|
||||
|
||||
//go:wasmexport wasi:cli/run@0.2.0#run
|
||||
//export wasi:cli/run@0.2.0#run
|
||||
func wasmexport_Run() (result0 uint32) {
|
||||
result := Exports.Run()
|
||||
result0 = cm.LowerResult(result)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user