Files
extism/java
zach 360df45e1a fix: require modules to have exported, bounded memory when manifest memory.max_pages field is set (#356)
- Requires modules compiled to run with manifests that set `max_memory`
to have an exported memory with lower and upper bounds
- Includes the size of memory exported from modules when calculating
available memory for plugins

## How to compile a module with bounded memory 

You will need to pass `--max-memory=$NUM_BYTES` to wasm-ld. `$NUM_BYTES`
must be a multiple of the page size. Here are some examples for
supported PDK languages:

**C** 
Pass `-Wl,--max-memory=65536` to your C compiler

**Rust**: 
In a `.cargo/config` file:
```toml
[target.wasm32-unknown-unknown]
rustflags = ["-Clink-args=--max-memory=65536"]
 ```
**Haskell**
Add the following to the cabal file entry for your `cabal.project` file:

```
package myproject
  ghc-options:
    -optl -Wl,--max-memory=65536
```
**AssemblyScript**
Pass `--maximumMemory 65536` to the assemblyscropt compiler

**TinyGo**:
Create a `target.json` file:
```json
{
    "inherits": [ "wasm" ],
    "ldflags": [
        "--max-memory=65536",
    ]
}
```
and build using `tinygo -target ./target.json`
2023-06-01 09:37:42 -07:00
..
2023-05-19 16:29:12 -05: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'