Class PanamaWasiEnvironment
java.lang.Object
ai.tegmentum.wasmtime4j.panama.wasi.cli.PanamaWasiEnvironment
- All Implemented Interfaces:
ai.tegmentum.wasmtime4j.wasi.cli.WasiEnvironment
public final class PanamaWasiEnvironment
extends Object
implements ai.tegmentum.wasmtime4j.wasi.cli.WasiEnvironment
Panama FFI implementation of the WasiEnvironment interface.
This class provides access to WASI Preview 2 environment and command-line operations through Panama Foreign Function API calls to the native Wasmtime library.
This implementation ensures defensive programming to prevent native resource leaks and JVM crashes.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionPanamaWasiEnvironment(MemorySegment contextHandle) Creates a new Panama WASI environment with the given native context handle. -
Method Summary
-
Constructor Details
-
PanamaWasiEnvironment
Creates a new Panama WASI environment with the given native context handle.- Parameters:
contextHandle- the native context handle- Throws:
IllegalArgumentException- if context handle is null
-
-
Method Details
-
getEnvironmentVariables
-
getVariable
-
getArguments
-
getInitialCwd
-