Wasm
JVM since3.10.0 Native since3.10.0 🧪Experimental
Run Wasm programs (WASI Preview 1 command modules) with the message body as standard input.
What’s inside
-
Wasm component, URI syntax:
wasm:module
Please refer to the above link for usage and configuration details.
Maven coordinates
Or add the coordinates to your existing project:
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-wasm</artifactId>
</dependency> Check the User guide for more information about writing Camel Quarkus applications.
Reading Wasm modules from the classpath in native mode
When Wasm modules are read from the classpath (the default) in native mode, you must ensure that the module(s) are added to the native image. You can do this via a configuration property in application.properties.
For example, assuming .wasm files are read from a classpath location of wasm/modules.
quarkus.native.resources.includes = wasm/modules/*.wasm More information about selecting resources for inclusion in the native executable can be found in the native mode user guide.
Camel Quarkus limitations
The compile=true option is not supported in native mode. Compiling a module generates JVM classes at runtime, which a native executable cannot load, so the producer fails to start: with its route, or with lazyStartProducer=true on the first exchange, which then fails. In native mode, modules are interpreted.