NullVm: fix bugs when linking with Rust SDK. #141
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been playing around with Rust SDK in my spare time and statically linking plugins in Rust with Envoy. I found that some changes must be made in the cpp-host to resolve the Rust SDK specific issues:
need to setfixed in the Rust Null VM SDK(https://github.com/mathetake/proxy-wasm-rust-nullvm/commit/ddfe09fb8914f93acc2439f00a6e486cc90856bc)Cloneable:CompiledBytecode
for Rust since we need to call_start
on all threads.This is still WIP since I haven't figured out how to fix Envoy tests, but all of them are uninteresting mock function calls and can be easily fixed.
With this change, it looks like we can link Rust SDK with Envoy without modifying Rust SDK itself and run them as NullVms without issues. I think this is awesome!
FYI, we can link multiple plugins at the same time without symbol collision with my simple trick here 🙂
ref:
Signed-off-by: Takeshi Yoneda takeshi@tetrate.io