#wasi #wasm-module #component #wit #preview2

app wasi-update

将WebAssembly模块转换为WASI组件的简单工具

4个版本

0.1.5 2024年5月10日
0.1.2 2024年4月19日
0.1.1 2024年2月17日
0.1.0 2024年2月17日

#284WebAssembly

每月29次下载

Apache-2.0 WITH LLVM-exception

285KB
504 代码行

WASI Update

将WebAssembly模块(wasm32-wasiwasm32-freestanding)转换为WASI组件(组件模型,WASI-preview2)的简单工具。

安装

预编译的二进制文件可用于以下操作系统:

  • Linux/x86_64 (.tar.gz和.deb)
  • Linux/aarch64
  • MacOS/aarch64
  • Windows/x86_64
  • Windows/aarch64
  • WebAssembly (WASI)

如果您真的想从源代码编译,请安装Rust并输入

rustup target add wasm32-unknown-unknown
cargo install wasi-update

用法

给工具提供要处理的WebAssembly模块和输出文件名,然后就可以了!

A simple tool to convert a WebAssembly module to a WASI component.

Usage: wasi-update --input <FILE> --output <FILE>

Options:
  -i, --input <FILE>   Input file (regular module)
  -o, --output <FILE>  Output file (component)
  -h, --help           Print help
  -V, --version        Print version

依赖

~8–17MB
~240K SLoC