wasmpluginv1

package
v0.0.0-...-ad79e7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WasmABI_name = map[int32]string{
		0: "WASM_ABI_UNSPECIFIED",
		1: "WASM_ABI_WASI_SNAPSHOT_PREVIEW1",
		2: "WASM_ABI_GOJS",
	}
	WasmABI_value = map[string]int32{
		"WASM_ABI_UNSPECIFIED":            0,
		"WASM_ABI_WASI_SNAPSHOT_PREVIEW1": 1,
		"WASM_ABI_GOJS":                   2,
	}
)

Enum value maps for WasmABI.

View Source
var File_wasmplugin_v1_wasmplugin_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ExecConfig

type ExecConfig struct {

	// When no ABI is provided, buf will make a best effort guess based on
	// the functions the wasm module exports.
	WasmAbi WasmABI `` /* 134-byte string literal not displayed */
	// The arguments that should be passed when running this plugin. Useful
	// for interpreted languages where the main wasm bundle is only the
	// interpreter.
	Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
	// Files that should be made available to the WASI fs when running this
	// plugin. Useful for interpreted languages where the main wasm bundle
	// is only the interpreter.
	Files []*File `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

ExecConfig describes buf specific extensions for a wasm plugin. A ExecConfig may be encoded in a custom WASM section named ".bufplugin", see (https://webassembly.github.io/spec/core/binary/modules.html#binary-customsec) for more info.

func (*ExecConfig) Descriptor deprecated

func (*ExecConfig) Descriptor() ([]byte, []int)

Deprecated: Use ExecConfig.ProtoReflect.Descriptor instead.

func (*ExecConfig) GetArgs

func (x *ExecConfig) GetArgs() []string

func (*ExecConfig) GetFiles

func (x *ExecConfig) GetFiles() []*File

func (*ExecConfig) GetWasmAbi

func (x *ExecConfig) GetWasmAbi() WasmABI

func (*ExecConfig) ProtoMessage

func (*ExecConfig) ProtoMessage()

func (*ExecConfig) ProtoReflect

func (x *ExecConfig) ProtoReflect() protoreflect.Message

func (*ExecConfig) Reset

func (x *ExecConfig) Reset()

func (*ExecConfig) String

func (x *ExecConfig) String() string

type File

type File struct {

	// Normalized path with `/` as directory separator.
	Path     string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Contents []byte `protobuf:"bytes,2,opt,name=contents,proto3" json:"contents,omitempty"`
	// contains filtered or unexported fields
}

File represents a file that must be made available to the wasi plugin.

func (*File) Descriptor deprecated

func (*File) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetContents

func (x *File) GetContents() []byte

func (*File) GetPath

func (x *File) GetPath() string

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

func (x *File) ProtoReflect() protoreflect.Message

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type WasmABI

type WasmABI int32

WASM_ABI specifies the abi this module expects buf to provide.

const (
	WasmABI_WASM_ABI_UNSPECIFIED WasmABI = 0
	// Plugins compiled against
	// https://github.com/WebAssembly/WASI/releases/tag/snapshot-01.
	WasmABI_WASM_ABI_WASI_SNAPSHOT_PREVIEW1 WasmABI = 1
	// Plugins compiled with `GOOS=js` and `GOARCH=wasm`.
	WasmABI_WASM_ABI_GOJS WasmABI = 2
)

func (WasmABI) Descriptor

func (WasmABI) Descriptor() protoreflect.EnumDescriptor

func (WasmABI) Enum

func (x WasmABI) Enum() *WasmABI

func (WasmABI) EnumDescriptor deprecated

func (WasmABI) EnumDescriptor() ([]byte, []int)

Deprecated: Use WasmABI.Descriptor instead.

func (WasmABI) Number

func (x WasmABI) Number() protoreflect.EnumNumber

func (WasmABI) String

func (x WasmABI) String() string

func (WasmABI) Type

func (WasmABI) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL