Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pi-pi-miao opened this issue Dec 12, 2024 · 0 comments

Comments

@pi-pi-miao
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant