bridge

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context) (*Bridge, error)

func (*Bridge) AddConsole

func (b *Bridge) AddConsole(ctx context.Context, ctxPtr uint32) error

func (*Bridge) Alloc

func (b *Bridge) Alloc(ctx context.Context, size uint32) (uint32, error)

func (*Bridge) Call

func (b *Bridge) Call(ctx context.Context, ctxPtr, funcPtr, thisPtr uint32, args []uint32) (uint32, error)

func (*Bridge) CallConstructor

func (b *Bridge) CallConstructor(ctx context.Context, ctxPtr, funcPtr uint32, args []uint32) (uint32, error)

func (*Bridge) Close

func (b *Bridge) Close(ctx context.Context) error

func (*Bridge) DeleteProperty

func (b *Bridge) DeleteProperty(ctx context.Context, ctxPtr, objPtr uint32, prop string) error

func (*Bridge) DupValue

func (b *Bridge) DupValue(ctx context.Context, ctxPtr, valPtr uint32) (uint32, error)

func (*Bridge) Eval

func (b *Bridge) Eval(ctx context.Context, ctxPtr uint32, code, filename string, flags int32) (uint32, error)

func (*Bridge) EvalModule

func (b *Bridge) EvalModule(ctx context.Context, ctxPtr uint32, code, filename string) (uint32, error)

func (*Bridge) ExecutePendingJobs

func (b *Bridge) ExecutePendingJobs(ctx context.Context, rtPtr uint32) (int32, error)

func (*Bridge) Free

func (b *Bridge) Free(ctx context.Context, ptr uint32) error

func (*Bridge) FreeContext

func (b *Bridge) FreeContext(ctx context.Context, ctxPtr uint32) error

func (*Bridge) FreeRuntime

func (b *Bridge) FreeRuntime(ctx context.Context, rtPtr uint32) error

func (*Bridge) FreeValue

func (b *Bridge) FreeValue(ctx context.Context, ctxPtr, valPtr uint32) error

func (*Bridge) GetArrayBuffer

func (b *Bridge) GetArrayBuffer(ctx context.Context, ctxPtr, valPtr uint32) ([]byte, error)

func (*Bridge) GetErrorMessage

func (b *Bridge) GetErrorMessage(ctx context.Context, ctxPtr, errPtr uint32) (string, error)

func (*Bridge) GetErrorStack

func (b *Bridge) GetErrorStack(ctx context.Context, ctxPtr, errPtr uint32) (string, error)

func (*Bridge) GetException

func (b *Bridge) GetException(ctx context.Context, ctxPtr uint32) (uint32, error)

func (*Bridge) GetGlobalObject

func (b *Bridge) GetGlobalObject(ctx context.Context, ctxPtr uint32) (uint32, error)

func (*Bridge) GetHeapPtr

func (b *Bridge) GetHeapPtr(ctx context.Context) (uint32, error)

func (*Bridge) GetHeapSize

func (b *Bridge) GetHeapSize(ctx context.Context) (uint32, error)

func (*Bridge) GetProperty

func (b *Bridge) GetProperty(ctx context.Context, ctxPtr, objPtr uint32, prop string) (uint32, error)

func (*Bridge) GetPropertyUint32

func (b *Bridge) GetPropertyUint32(ctx context.Context, ctxPtr, objPtr, idx uint32) (uint32, error)

func (*Bridge) GetRuntime

func (b *Bridge) GetRuntime(ctx context.Context, ctxPtr uint32) (uint32, error)

func (*Bridge) HasException

func (b *Bridge) HasException(ctx context.Context, ctxPtr uint32) (bool, error)

func (*Bridge) HasProperty

func (b *Bridge) HasProperty(ctx context.Context, ctxPtr, objPtr uint32, prop string) (bool, error)

func (*Bridge) Instanceof

func (b *Bridge) Instanceof(ctx context.Context, ctxPtr, valPtr, ctorPtr uint32) (bool, error)

func (*Bridge) Invoke

func (b *Bridge) Invoke(ctx context.Context, ctxPtr, objPtr uint32, method string, args []uint32) (uint32, error)

func (*Bridge) IsArray

func (b *Bridge) IsArray(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsBigInt

func (b *Bridge) IsBigInt(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsBool

func (b *Bridge) IsBool(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsDate

func (b *Bridge) IsDate(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsError

func (b *Bridge) IsError(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsException

func (b *Bridge) IsException(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsFunction

func (b *Bridge) IsFunction(ctx context.Context, ctxPtr, valPtr uint32) (bool, error)

func (*Bridge) IsNull

func (b *Bridge) IsNull(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsNumber

func (b *Bridge) IsNumber(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsObject

func (b *Bridge) IsObject(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsPromise

func (b *Bridge) IsPromise(ctx context.Context, ctxPtr, valPtr uint32) (bool, error)

func (*Bridge) IsString

func (b *Bridge) IsString(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsSymbol

func (b *Bridge) IsSymbol(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) IsUndefined

func (b *Bridge) IsUndefined(ctx context.Context, valPtr uint32) (bool, error)

func (*Bridge) JSONParse

func (b *Bridge) JSONParse(ctx context.Context, ctxPtr uint32, json string) (uint32, error)

func (*Bridge) JSONStringify

func (b *Bridge) JSONStringify(ctx context.Context, ctxPtr, valPtr uint32) (string, error)

func (*Bridge) Memory

func (b *Bridge) Memory() api.Memory

func (*Bridge) NewArray

func (b *Bridge) NewArray(ctx context.Context, ctxPtr uint32) (uint32, error)

func (*Bridge) NewArrayBuffer

func (b *Bridge) NewArrayBuffer(ctx context.Context, ctxPtr uint32, data []byte) (uint32, error)

func (*Bridge) NewBigInt64

func (b *Bridge) NewBigInt64(ctx context.Context, ctxPtr uint32, val int64) (uint32, error)

func (*Bridge) NewBigUint64

func (b *Bridge) NewBigUint64(ctx context.Context, ctxPtr uint32, val uint64) (uint32, error)

func (*Bridge) NewBool

func (b *Bridge) NewBool(ctx context.Context, val bool) (uint32, error)

func (*Bridge) NewCFunction

func (b *Bridge) NewCFunction(ctx context.Context, ctxPtr, funcID uint32, name string, argCount int32) (uint32, error)

func (*Bridge) NewContext

func (b *Bridge) NewContext(ctx context.Context, rtPtr uint32) (uint32, error)

func (*Bridge) NewDate

func (b *Bridge) NewDate(ctx context.Context, ctxPtr uint32, epochMs float64) (uint32, error)

func (*Bridge) NewFloat64

func (b *Bridge) NewFloat64(ctx context.Context, val float64) (uint32, error)

func (*Bridge) NewInt32

func (b *Bridge) NewInt32(ctx context.Context, val int32) (uint32, error)

func (*Bridge) NewInt64

func (b *Bridge) NewInt64(ctx context.Context, ctxPtr uint32, val int64) (uint32, error)

func (*Bridge) NewNull

func (b *Bridge) NewNull(ctx context.Context) (uint32, error)

func (*Bridge) NewObject

func (b *Bridge) NewObject(ctx context.Context, ctxPtr uint32) (uint32, error)

func (*Bridge) NewRuntime

func (b *Bridge) NewRuntime(ctx context.Context) (uint32, error)

func (*Bridge) NewString

func (b *Bridge) NewString(ctx context.Context, ctxPtr uint32, s string) (uint32, error)

func (*Bridge) NewStringLen

func (b *Bridge) NewStringLen(ctx context.Context, ctxPtr uint32, s string) (uint32, error)

func (*Bridge) NewUndefined

func (b *Bridge) NewUndefined(ctx context.Context) (uint32, error)

func (*Bridge) ReadBytes

func (b *Bridge) ReadBytes(ptr, length uint32) []byte

func (*Bridge) ReadCString

func (b *Bridge) ReadCString(ptr, maxLen uint32) string

func (*Bridge) RegisterGoFunc

func (b *Bridge) RegisterGoFunc(fn GoFunc) uint32

func (*Bridge) ResetHeap

func (b *Bridge) ResetHeap(ctx context.Context) error

func (*Bridge) RunGC

func (b *Bridge) RunGC(ctx context.Context, rtPtr uint32) error

func (*Bridge) SetLogFunc

func (b *Bridge) SetLogFunc(fn func(msg string))

func (*Bridge) SetMaxStackSize

func (b *Bridge) SetMaxStackSize(ctx context.Context, rtPtr, stackSize uint32) error

func (*Bridge) SetMemoryLimit

func (b *Bridge) SetMemoryLimit(ctx context.Context, rtPtr, limit uint32) error

func (*Bridge) SetProperty

func (b *Bridge) SetProperty(ctx context.Context, ctxPtr, objPtr uint32, prop string, valPtr uint32) error

func (*Bridge) SetPropertyUint32

func (b *Bridge) SetPropertyUint32(ctx context.Context, ctxPtr, objPtr, idx, valPtr uint32) error

func (*Bridge) ThrowError

func (b *Bridge) ThrowError(ctx context.Context, ctxPtr uint32, msg string) (uint32, error)

func (*Bridge) ThrowTypeError

func (b *Bridge) ThrowTypeError(ctx context.Context, ctxPtr uint32, msg string) (uint32, error)

func (*Bridge) ToBigInt64

func (b *Bridge) ToBigInt64(ctx context.Context, ctxPtr, valPtr uint32) (int64, error)

func (*Bridge) ToBool

func (b *Bridge) ToBool(ctx context.Context, ctxPtr, valPtr uint32) (bool, error)

func (*Bridge) ToFloat64

func (b *Bridge) ToFloat64(ctx context.Context, ctxPtr, valPtr uint32) (float64, error)

func (*Bridge) ToInt32

func (b *Bridge) ToInt32(ctx context.Context, ctxPtr, valPtr uint32) (int32, error)

func (*Bridge) ToInt64

func (b *Bridge) ToInt64(ctx context.Context, ctxPtr, valPtr uint32) (int64, error)

func (*Bridge) ToString

func (b *Bridge) ToString(ctx context.Context, ctxPtr, valPtr uint32) (string, error)

func (*Bridge) ToStringFull

func (b *Bridge) ToStringFull(ctx context.Context, ctxPtr, valPtr uint32) (string, error)

func (*Bridge) Typeof

func (b *Bridge) Typeof(ctx context.Context, ctxPtr, valPtr uint32) (string, error)

func (*Bridge) UnregisterGoFunc

func (b *Bridge) UnregisterGoFunc(funcID uint32)

func (*Bridge) WriteBytes

func (b *Bridge) WriteBytes(ctx context.Context, data []byte) (ptr uint32, err error)

func (*Bridge) WriteString

func (b *Bridge) WriteString(ctx context.Context, s string) (ptr uint32, err error)

type GoFunc

type GoFunc func(ctxPtr uint32, args []uint32) uint32

Jump to

Keyboard shortcuts

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