We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read_link
use std::fs::read_link; fn main() { let link = read_link("./link.txt").unwrap(); println!("{:?}", link); }
import { readFile } from 'node:fs/promises' import { join } from 'node:path' import { fileURLToPath } from 'node:url' import { WASI } from 'node:wasi' const wasi = new WASI({ preopens: { '/': join(fileURLToPath(import.meta.url), '..'), }, version: 'preview1', env: process.env, }) const wasm = await WebAssembly.compile( await readFile(new URL('./target/wasm32-wasi/debug/wasi-read-link.wasm', import.meta.url)) ) const instance = await WebAssembly.instantiate(wasm, wasi.getImportObject()) wasi.start(instance)
wasmtime run --dir $(pwd)::/ target/wasm32-wasi/debug/wasi-read-link.wasm
node index.mjs
The text was updated successfully, but these errors were encountered:
Fix extra trailing '\0' char in uvwasi_path_readlink
ab6faf7
- Close nodejs#262
Successfully merging a pull request may close this issue.
Source code
wasmtime run --dir $(pwd)::/ target/wasm32-wasi/debug/wasi-read-link.wasm
node index.mjs
The text was updated successfully, but these errors were encountered: