blob: 67459efb8acdd3791c1f1a6b9099a1578ae59c87 [file] [log] [blame]
// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
[id="extensions-wasm"]
= Wasm
:linkattrs:
:cq-artifact-id: camel-quarkus-wasm
:cq-native-supported: true
:cq-status: Experimental
:cq-status-deprecation: Experimental
:cq-description: Invoke Wasm functions.
:cq-deprecated: false
:cq-jvm-since: 3.10.0
:cq-native-since: 3.10.0
ifeval::[{doc-show-badges} == true]
[.badges]
[.badge-key]##JVM since##[.badge-supported]##3.10.0## [.badge-key]##Native since##[.badge-supported]##3.10.0##
endif::[]
Invoke Wasm functions.
[id="extensions-wasm-whats-inside"]
== What's inside
* xref:{cq-camel-components}::wasm-component.adoc[Wasm component], URI syntax: `wasm:functionName`
* xref:{cq-camel-components}:languages:wasm-language.adoc[Wasm language]
Please refer to the above links for usage and configuration details.
[id="extensions-wasm-maven-coordinates"]
== Maven coordinates
https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-wasm[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]
Or add the coordinates to your existing project:
[source,xml]
----
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-wasm</artifactId>
</dependency>
----
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]
[id="extensions-wasm-usage"]
== Usage
[id="extensions-wasm-usage-reading-wasm-modules-from-the-classpath-in-native-mode"]
== 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 `was/modules`.
[source,properties]
----
quarkus.native.resources.includes = wasm/modules/*.wasm
----
More information about selecting resources for inclusion in the native executable can be found in the xref:user-guide/native-mode.adoc#embedding-resource-in-native-executable[native mode user guide].