Skip to content

[Feature] Provide a reusable request, configuration and result bridge for WASM base plugins #7561

Open

Description

@Aias00

Feature Request

Provide a reusable, documented host bridge for real request/configuration data and guest results in AbstractShenyuWasmPlugin.

Is your feature request related to a problem? Please describe

The default constructor creates a plain new WasmLoader(this.getClass(), null). Its built-in host functions delegate to onGetArgs/onPutResult, both of which return 0 by default.

The guest can execute, but the default bridge supplies no serialized request/selector/rule data and ignores results. Subclasses can use the Consumer constructor to implement this manually; existing tests do so with fixed strings.

Configuration handlers and request plugins also own separate loaders/guest instances. Updating configuration in a handler's guest memory does not automatically update request-execution state. Java-side shared caches/host callbacks can bridge this today, but the base library offers no documented end-to-end pattern.

Describe the solution you'd like

  • Provide a supported bridge for request metadata, selector/rule configuration and guest results, while retaining custom HostFunction support.
  • Define how guest results map to chain continuation, rejection or supported HTTP changes.
  • Document and demonstrate how configuration updates become visible to request execution across independently instantiated handlers/plugins.
  • Define buffer sizing, serialization, error and cleanup behavior.
  • Test the default/supported bridge with real DTOs and HTTP exchanges, not only fixed strings.

Describe alternatives you've considered

Require every plugin to register all host functions manually. If this remains the intended design, make the default no-op behavior explicit and supply a complete reusable example.

Additional context

ShenYu: 2.7.2-SNAPSHOT, commit 2dff2730ff399635b2bc657e21a903f391fb9df8; Java 17; Chicory 1.7.3.

This is an enhancement request, not a claim that custom Java adapters cannot work.

Activity

  1. github-actions commented on Oct 12, 2026

    @github-actions
    Contributor

    👋 Hello @Aias00

    A new issue has been opened by @Aias00:

    Please review when you have time. Thank you! 🙏

  2. yangjj-iso commented on Oct 12, 2026

    @yangjj-iso
    Contributor

    /assgin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions