Fix compilation errors in wasmtime backend implementation
- Remove unused import (std::sync::Arc) - Use raw pointer approach for Caller trait implementation to work around Rust lifetime constraints with wasmtime::Caller parameter - Implement runtime::Caller trait methods using unsafe pointer access, which is safe because the pointer lifetime is controlled within the host function closure The key challenge was that wasmtime's closure signature provides a Caller parameter with a specific lifetime that doesn't satisfy the trait object requirements for runtime::Caller. The solution uses unsafe pointer casting with careful lifetime management to bridge the gap between wasmtime's API and swc_plugin_runner's trait interface.
Showing
This diff is collapsed.
This diff is collapsed.
Please
register
or
sign in
to comment