I am migrating a large JavaScript codebase to Rust WebAssembly. The plan was to rewrite one function in rust, compile it to an independent module; then patch the original mo