Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@wasmer/wasi
Advanced tools
Isomorphic Javascript library for interacting with WASI Modules in Node.js and the Browser. 📚
@wasmer/wasi
Isomorphic Javascript library for interacting with WASI Modules in Node.js and the Browser. 📚
Documentation for Wasmer-JS Stack can be found on the Wasmer Docs.
This project is forked from node-wasi, a Node implementation made by Gus Caplan. 🙏😄 It uses the same API than the future WASI integration in Node, to help transition to it once it becomes available in Node.
However, @wasmer/wasi
is focused on:
For instaling @wasmer/wasi
, just run this command in your shell:
npm install --save @wasmer/wasi
This quick start is for browsers. For node, WasmFs is not required
import { WASI } from "@wasmer/wasi";
import { WasmFs } from "@wasmer/wasmfs";
// Instantiate a new WASI Instance
const wasmFs = new WasmFs();
let wasi = new WASI({
args: [],
env: {},
bindings: {
...WASI.defaultBindings,
fs: wasmFs.fs
}
});
const startWasiTask = async () => {
// Fetch our Wasm File
const response = await fetch("./my-wasi-module.wasm");
const responseArrayBuffer = await response.arrayBuffer();
// Instantiate the WebAssembly file
const wasm_bytes = new Uint8Array(responseArrayBuffer).buffer;
let { instance } = await WebAssembly.instantiate(wasm_bytes, {
wasi_unstable: wasi.wasiImport
});
// Start the WebAssembly WASI instance!
wasi.start(instance);
// Output what's inside of /dev/stdout!
const stdout = await wasmFs.getStdOut();
console.log(stdout);
};
startWasiTask();
The Reference API Documentation can be found on the @wasmer/wasi
Reference API Wasmer Docs.
This project follows the all-contributors specification.
Contributions of any kind are welcome! 👍
FAQs
Isomorphic Javascript library for interacting with WASI Modules in Node.js and the Browser.
The npm package @wasmer/wasi receives a total of 10,319 weekly downloads. As such, @wasmer/wasi popularity was classified as popular.
We found that @wasmer/wasi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.