diff --git a/core-common/pom.xml b/core-common/pom.xml
index 7fcaee7..c03546e 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -15,6 +15,11 @@
Protobuf common support for protobuf4j
+
+ com.dylibso.chicory
+ annotations
+ ${chicory.version}
+
com.dylibso.chicory
wasi
@@ -50,24 +55,33 @@
- com.dylibso.chicory
- chicory-compiler-maven-plugin
- ${chicory.version}
+ org.apache.maven.plugins
+ maven-antrun-plugin
- protoc-wrapper
+ normalize-wasm-path
- compile
+ run
+ initialize
- io.roastedroot.protobuf4j.common.ProtobufWrapperCommon
- ${project.basedir}/../wasm/protoc-wrapper-v3.wasm
- io.roastedroot.protobuf4j.common.Protobuf
+
+
+
+
+
+
+
+
+
+
+
+
+ true
-
org.apache.maven.plugins
maven-checkstyle-plugin
@@ -86,6 +100,18 @@
org.apache.maven.plugins
maven-compiler-plugin
+
+ org.codehaus.mojo
+ templating-maven-plugin
+
+
+ filtering-java-templates
+
+ filter-sources
+
+
+
+
diff --git a/core-common/src/main/java-templates/io/roastedroot/protobuf4j/common/WasmResource.java b/core-common/src/main/java-templates/io/roastedroot/protobuf4j/common/WasmResource.java
new file mode 100644
index 0000000..730640b
--- /dev/null
+++ b/core-common/src/main/java-templates/io/roastedroot/protobuf4j/common/WasmResource.java
@@ -0,0 +1,7 @@
+package io.roastedroot.protobuf4j.common;
+
+public final class WasmResource {
+ public static final String absoluteFile = "${wasm.resource.url}";
+
+ private WasmResource() {}
+}
diff --git a/core-common/src/main/java/io/roastedroot/protobuf4j/common/Protobuf.java b/core-common/src/main/java/io/roastedroot/protobuf4j/common/Protobuf.java
index 52a2b40..a301676 100644
--- a/core-common/src/main/java/io/roastedroot/protobuf4j/common/Protobuf.java
+++ b/core-common/src/main/java/io/roastedroot/protobuf4j/common/Protobuf.java
@@ -1,5 +1,6 @@
package io.roastedroot.protobuf4j.common;
+import com.dylibso.chicory.annotations.WasmModuleInterface;
import com.dylibso.chicory.runtime.ByteArrayMemory;
import com.dylibso.chicory.runtime.ImportMemory;
import com.dylibso.chicory.runtime.ImportValues;
@@ -28,6 +29,7 @@
import java.util.logging.Logger;
import java.util.stream.Collectors;
+@WasmModuleInterface(value = WasmResource.absoluteFile)
public final class Protobuf {
private static final Logger LOGGER = Logger.getLogger(Protobuf.class.getCanonicalName());
diff --git a/core-v3/pom.xml b/core-v3/pom.xml
index 3870ae8..8db2698 100644
--- a/core-v3/pom.xml
+++ b/core-v3/pom.xml
@@ -73,6 +73,18 @@
org.apache.maven.plugins
maven-compiler-plugin
+
+ org.codehaus.mojo
+ templating-maven-plugin
+
+
+ filtering-java-templates
+
+ filter-sources
+
+
+
+
diff --git a/core-v4/pom.xml b/core-v4/pom.xml
index 2c76c1c..fd3a190 100644
--- a/core-v4/pom.xml
+++ b/core-v4/pom.xml
@@ -73,6 +73,18 @@
org.apache.maven.plugins
maven-compiler-plugin
+
+ org.codehaus.mojo
+ templating-maven-plugin
+
+
+ filtering-java-templates
+
+ filter-sources
+
+
+
+
diff --git a/pom.xml b/pom.xml
index e8e97c5..e2c7537 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,6 +62,7 @@
12.3.1
3.6.0
3.4.0
+ 3.1.0
3.15.0
3.5.2
${surefire-plugin.version}
@@ -160,8 +161,21 @@
true
${maven.compiler.release}
+ true
+
+
+ com.dylibso.chicory
+ annotations-processor
+ ${chicory.version}
+
+
+
+ org.codehaus.mojo
+ templating-maven-plugin
+ ${templating-maven-plugin.version}
+
@@ -185,6 +199,7 @@
true
${maven.compiler.release}
+ true