DefaultSimpleBridgeCallbacks class final

SimpleBridgeCallbacks 的默认实现,基于 wasd.WASI 。

Inheritance

Constructors

DefaultSimpleBridgeCallbacks(Map<String, Uint8List> files)
创建 SimpleBridgeCallbacks 的默认实现。

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bindLinearMemory(Memory memory) → void
将 Wasm 模块导出的线性内存交由宿主,供内部 _wasi 进行文件读写,一般在 WebAssembly.instantiateStreaming 模块实例化后调用。
clock_time_get(int clockId, Object? precision, int timePtr) → int
override
environ_get(int environPtr, int environBufPtr) → int
override
environ_sizes_get(int environCountPtr, int environBufSizePtr) → int
override
fd_close(int fd) → int
override
fd_fdstat_get(int fd, int fdstatPtr) → int
override
fd_fdstat_set_flags(int fd, int flags) → int
override
fd_prestat_dir_name(int fd, int pathPtr, int pathLen) → int
override
fd_prestat_get(int fd, int prestatPtr) → int
override
fd_read(int fd, int iovs, int iovsLen, int nreadPtr) → int
override
fd_seek(int fd, Object? offset, int whence, int newOffsetPtr) → int
override
fd_write(int fd, int iovs, int iovsLen, int nwrittenPtr) → int
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
path_open(int fd, int dirflags, int pathPtr, int pathLen, int oflags, Object? rightsBase, Object? rightsInheriting, int fdflags, int openedFdPtr) → int
override
proc_exit(int code) → void
override
toString() → String
A string representation of this object.
inherited
updateFiles(Map<String, Uint8List> files) → void
需要更新文件时调用此函数以进行全量更新。例如在运行时调用 select pinyin_dict('/path/to/new_pinyin.txt') 更新了 Simple 的拼音文件,需要向 files 传入 { "/path/to/new_pinyin.txt": 拼音文件字节内容 } 。

Operators

operator ==(Object other) → bool
The equality operator.
inherited