From 1868d36cfed54e48c3439ec4547251e45731c93a Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com> Date: Sun, 28 May 2023 07:11:01 -0700 Subject: [PATCH] fix(plugin/runner): Disable `wasi_env` cleanup (#7458) --- crates/swc_plugin_runner/src/transform_executor.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/swc_plugin_runner/src/transform_executor.rs b/crates/swc_plugin_runner/src/transform_executor.rs index 7010758d9cb..e6164cd438c 100644 --- a/crates/swc_plugin_runner/src/transform_executor.rs +++ b/crates/swc_plugin_runner/src/transform_executor.rs @@ -119,9 +119,13 @@ impl PluginTransformState { guest_program_ptr.1, )?; + /* [Note]: currently this is disabled: this cleanup is for the multi-threaded + * wasi environment as well as cleaning up file handles which is for the cases + * running wasi binary as standalone. SWC doesn't need neither currently, will + * revisit once we support multithreaded plugin. if let Some(wasi_env) = &self.wasi_env { wasi_env.cleanup(&mut self.store, None); - } + }*/ ret }