[
https://issues.apache.org/jira/browse/CAMEL-25677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-25677 started by shashank.
----------------------------------------
> camel-wasm - remove the wasm language
> -------------------------------------
>
> Key: CAMEL-25677
> URL: https://issues.apache.org/jira/browse/CAMEL-25677
> Project: Camel
> Issue Type: Task
> Reporter: shashank
> Assignee: shashank
> Priority: Major
>
> Since CAMEL-25531 the {{wasm}} endpoint runs WASI Preview 1 command modules:
> the message body is standard input and standard output becomes the new body.
> The {{wasm}} language still uses the old protocol of the component: it calls
> a named exported function of the module through the {{alloc}}/{{dealloc}}
> exports and a JSON envelope of the body and headers ({{WasmFunction}},
> {{WasmSupport}}).
> On the pull request of CAMEL-25606
> ([https://github.com/apache/camel/pull/27793]) the maintainer decided to
> remove the language rather than move it to the WASI protocol: "remove wasm
> language, this module was an experiment so its fine to do such changes", and
> "the removal can be in a follow up PR". This ticket is that follow-up.
> h3. What is removed
> * The language in camel-wasm: {{org.apache.camel.language.wasm.WasmLanguage}}
> and {{WasmExpression}}, their generated metadata (language json, service
> files) and the language page {{wasm-language.adoc}}.
> * The helpers that only the language used:
> {{org.apache.camel.wasm.WasmFunction}}, {{WasmSupport}}, and the constants
> {{Wasm.FN_ALLOC}} and {{Wasm.FN_DEALLOC}}. The endpoint does not use them
> since CAMEL-25531.
> * The model and the DSLs: {{org.apache.camel.model.language.WasmExpression}},
> {{WasmExpressionReifier}}, {{wasm(...)}} in {{Builder}},
> {{ExpressionClause}}, {{ExpressionClauseSupport}} and
> {{LanguageBuilderFactory}}, and the {{wasm}} expression of the XML and YAML
> DSLs, the Java DSL writer and the generated parsers, writers and schemas, and
> the {{wasm}} language entries of the catalog, of camel-main and of the
> endpoint DSL documentation.
> * {{wasm}} in the language names of the {{language}} component and of the
> camel-jbang and YAML validator lists of script languages.
> * The test module of the language ({{functions.wasm}} and its Rust sources)
> and its tests. The endpoint test that used {{functions.wasm}} as a module
> without {{_start}} builds an equivalent module from WAT instead.
> * The Jackson dependencies of camel-wasm (only {{WasmSupport}} used them).
> h3. What stays
> The {{wasm}} endpoint ({{WasmComponent}}, {{WasmEndpoint}}, {{WasmProducer}},
> {{WasiCommand}}, {{Wasm.SCHEME}} and the {{Wasm.Headers}}) is unchanged.
> camel-opa, which has its own Wasm runtime for OPA policies, is not touched.
> h3. Migration
> Call the module with the {{wasm}} endpoint as a route step, for example
> {{.to("wasm:classpath:transform.wasm")}}. The module must be a WASI command
> module (built for {{wasm32-wasip1}} in Rust, or with {{GOOS=wasip1
> GOARCH=wasm}} in Go) that reads the body on standard input and writes the
> result to standard output. A short note goes into the 4.24 upgrade guide, in
> the existing camel-wasm section.
> _Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)