Skip to content

Commit

Permalink
Merge pull request #3 from dylibso/switch-to-java-11
Browse files Browse the repository at this point in the history
Switch to back to Java 11
  • Loading branch information
bhelx authored Sep 25, 2023
2 parents 19faf95 + eed93b8 commit 0aeef02
Show file tree
Hide file tree
Showing 12 changed files with 480 additions and 199 deletions.
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
<packaging>pom</packaging>

<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
Expand Down Expand Up @@ -47,7 +50,9 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<release>${maven.compiler.target}</release>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,39 @@

import java.util.List;

public record HostFunction(WasmFunctionHandle handle, String moduleName, String fieldName, List<ValueType> paramTypes, List<ValueType> returnTypes) {
public class HostFunction {
private final WasmFunctionHandle handle;
private final String moduleName;
private final String fieldName;
private final List<ValueType> paramTypes;
private final List<ValueType> returnTypes;

HostFunction(WasmFunctionHandle handle, String moduleName, String fieldName, List<ValueType> paramTypes, List<ValueType> returnTypes) {
this.handle = handle;
this.moduleName = moduleName;
this.fieldName = fieldName;
this.paramTypes = paramTypes;
this.returnTypes = returnTypes;
}

public WasmFunctionHandle getHandle() {
return handle;
}

public String getModuleName() {
return moduleName;
}

public String getFieldName() {
return fieldName;
}

public List<ValueType> getParamTypes() {
return paramTypes;
}

public List<ValueType> getReturnTypes() {
return returnTypes;
}

}
Loading

0 comments on commit 0aeef02

Please sign in to comment.