initial inter-process/inter-machine library interposition implementation#1201
Open
qianxichen233 wants to merge 19 commits into
Open
initial inter-process/inter-machine library interposition implementation#1201qianxichen233 wants to merge 19 commits into
qianxichen233 wants to merge 19 commits into
Conversation
Wrap each library export in instance_dylink with a host closure so every call from the main module passes through an interception point. This is the foundation for future remote-call delegation: the wrapper currently forwards transparently to the original library function, but provides the hook where local-vs-remote scheduling will be inserted. Add Func::call_nested / call_unchecked_raw_nested to call a WASM function without processing the store's on_called asyncify callback. The standard Func::call loop would steal fork/exec/exit callbacks set inside the library before the outer _start invocation could process them, resetting __asyncify_state to 0 and corrupting the asyncify unwind. call_nested leaves the callback in the store for the top-level call_unchecked_raw loop to handle, keeping asyncify correct across the host-function boundary introduced by the wrapper. Add remote-lib feature gate to wasmtime, lind-dylink, and lind-boot Cargo manifests.
# Conflicts: # Makefile # src/lind-boot/Cargo.toml # src/wasmtime/crates/wasmtime/src/runtime/linker.rs
…e change Co-Authored-By: Qianxi Chen <qianxi@example.com>
…ker.rs - Resolve merge conflicts in Cargo.toml, runtime.rs, linker.rs - Update call_nested/call_unchecked_raw_nested to v44 API: call_impl_check_args now returns Result<()>; invoke_wasm_and_catch_traps closure takes (NonNull<VMContext>, Option<InterpreterRef>) -> bool; VMFuncRef::array_call is now a static method - Replace anyhow! with format_err! and use Error::from_anyhow for dispatch_remote_call result conversion in remote-lib linker code - Fix ExportMemory::data_ptr -> .unshared().data_ptr() for v44 API
… names examples/remote-calls → test/library-interposition-examples/basic examples/remote-calls-percage → test/library-interposition-examples/per-cage-routing examples/remote-calls-ptr → test/library-interposition-examples/pointer-marshaling examples/remote-calls-rand → test/library-interposition-examples/rand-library examples/remote-calls-zlib → test/library-interposition-examples/zlib-compression Update all internal path references in run scripts and JSON configs. Remove now-empty examples/ directory.
Update all internal path references in run scripts and JSON configs.
Contributor
End-to-End Test ReportTest Previewgrate harnessGrate Test Report
Cases
static harnessTest ReportDeterministic TestsSummary
Test Results by Category
Fail TestsSummary
wasm harnessTest ReportDeterministic TestsSummary
Test Results by Category
Fail TestsSummary
Test Results by Category
C++ harnessSummary
Cases
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
initial library interposition design/implementaiton for inter-process and inter-machine scenario via remote RPC protocol
attached a bunch of examples, might be messy though
implementation details under
docs/internal/remote-library-calls.md