Skip to content

Add FFI binding to bridge host-side remove implementation for shared data #426

Open
@pi-pi-miao

Description

@pi-pi-miao

I noticed something interesting about the shared data functionality in proxy-wasm:

In proxy-wasm-cpp-host, there's an implementation of a remove method for shared data:

WasmResult remove(std::string_view vm_id, std::string_view key, uint32_t cas,
                    std::pair<std::string, uint32_t> *result);

However, I find it strange that there's no corresponding FFI method exposed in the ABI layer. This means that while the host implementation supports data removal, WASM modules cannot actually use this functionality since there's no FFI bridge to access it.

This seems like a gap in the implementation where:

  1. The host capability exists and is fully implemented
  2. But it's not accessible through the FFI layer
  3. Which means WASM modules (like those written in Rust using proxy-wasm-rust-sdk) cannot utilize this feature

Is this intentional or an oversight? If there's a valid reason for not exposing this functionality through the FFI layer, it would be helpful to understand the rationale. If not, perhaps we should consider adding the corresponding FFI method to complete this feature.

Would it make sense to add an FFI binding for this functionality to make the shared data API more complete?

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