Wasm::Wasmtime::WasiInstance - WASI instance class
use Wasm::Wasmtime; my $store = Wasm::Wasmtime::Store->new; my $wasi = Wasm::Wasmtime::WasiInstance->new( $store, "wasi_snapshot_preview1", );
WARNING: WebAssembly and Wasmtime are a moving target and the interface for these modules is under active development. Use with caution.
This class represents the WebAssembly System Interface (WASI). For WebAssembly WASI is the equivalent to the part of libc that interfaces with the system.
To configure if and how the WASI accesses program argument, environment, standard streams and file system directories, see Wasm::Wasmtime::WasiConfig.
For a complete example of using WASI from WebAssembly, see the synopsis for Wasm::Wasmtime::Linker.
my $wasi = Wasm::Wasmtime::WasiInstance->new( $store, # Wasm::Wasmtime::Store, $name, # string $config, # Wasm::Wasmtime::WasiConfig, ); my $wasi = Wasm::Wasmtime::WasiInstance->new( $store, # Wasm::Wasmtime::Store, $name, # string );
Create a new WASI instance.
Graham Ollis <firstname.lastname@example.org>
This software is copyright (c) 2020 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.