Class PanamaWasiExit
java.lang.Object
ai.tegmentum.wasmtime4j.panama.wasi.cli.PanamaWasiExit
- All Implemented Interfaces:
ai.tegmentum.wasmtime4j.wasi.cli.WasiExit
public final class PanamaWasiExit
extends Object
implements ai.tegmentum.wasmtime4j.wasi.cli.WasiExit
Panama FFI implementation of the WasiExit interface.
This class provides access to WASI Preview 2 program termination 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
-
Field Summary
Fields inherited from interface ai.tegmentum.wasmtime4j.wasi.cli.WasiExit
EXIT_FAILURE, EXIT_SUCCESS -
Constructor Summary
ConstructorsConstructorDescriptionPanamaWasiExit(MemorySegment contextHandle) Creates a new Panama WASI exit with the given native context handle. -
Method Summary
-
Constructor Details
-
PanamaWasiExit
Creates a new Panama WASI exit with the given native context handle.- Parameters:
contextHandle- the native context handle- Throws:
IllegalArgumentException- if context handle is null
-
-
Method Details
-
exit
public void exit(int statusCode) - Specified by:
exitin interfaceai.tegmentum.wasmtime4j.wasi.cli.WasiExit
-