Files
extism/java
zach 94d5bd98c8 feat: Add plugin cancellation (#270)
This PR adds the ability to cancel running plugins from another thread
in the host.

- All SDKs have been updated except  .NET
- Adds a new SDK type: `ExtismCancelHandle`
- Adds 2 new SDK functions: `extism_plugin_cancel_handle` and
`extism_plugin_cancel`
- `extism_plugin_cancel_handle` returns a pointer to
`ExtismCancelHandle`, which can be passed to `extism_plugin_cancel` to
stop plugin execution.
- One thing that's worth noting is when plugin is executing a host
function it cannot be cancelled until after the host function returns.

---------

Co-authored-by: Etienne ANNE <etienne.anne@icloud.com>
2023-03-08 17:44:40 -08:00
..
2023-03-08 17:44:40 -08:00
2022-12-19 11:42:08 -06:00

Extism Java-SDK

Java SDK for the extism WebAssembly Plugin-System.

Build

To build the extism java-sdk run the following command:

mvn clean verify

Usage

To use the extism java-sdk you need to add the org.extism.sdk dependency to your dependency management and ensure that
the native extism library is installed on your system. For installing the native library refer to the extism documentation.

Instead of installing the native library on your system, you can also download the appropriate library for your platform yourself.
To do that simply download the extism release to a folder and run your java application with the system property -Djna.library.path=/path/to/folder.

Maven

To use the extism java-sdk with maven you need to add the following dependency to your pom.xml file:

<dependency>
    <groupId>org.extism.sdk</groupId>
    <artifactId>extism</artifactId>
    <version>0.1.0</version>
</dependency>

Gradle

To use the extism java-sdk with maven you need to add the following dependency to your build.gradle file:

implementation 'org.extism.sdk:extism:0.1.0'