由 Wasmer 维护的 JavaScript 和 WebAssembly 软件包的单一仓库
在 JavaScript 的轻量级 WebAssembly 环境中运行真实软件 Python、Swift (macOS 预览) 或 Rust。 Wasmer SDK 将来自的包转换为 将 Wasmer 注册表 转换为可组合 添加 Python、PostgreSQL、Edge.js、PHP、shell 工具或自定义内容 包; 分配沙箱文件和功能; 然后运行命令或保持 您控制下的长期运行的进程。
import { Wasmer } from "@wasmer/sdk/node";
const wasmer = new Wasmer();
const sandbox = await wasmer.sandboxes.create({
packages: ["python/python@=3.13.20"],
files: { "hello.py": "print('Hello from Wasmer')" },
});
const output = await sandbox
.command("python", ["/workspace/hello.py"])
.run();
console.log(output.text());同一个包、沙箱、命令、进程、文件系统和端口模型 在每种语言的 SDK 中都可用。
这些示例共享 fixtures/ 中的客户端程序,因此每个 S
wasmer.sh application WASIX Epoxy package JavaScript service-worker example Rust example Rust example Rust example Rust example
暂无开放 Issues,或尚未同步最近议题。