From 50c64b41e90ea88910a38bd3d47084a5f61c8f1e Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> Date: Wed, 16 Sep 2026 11:05:52 -0700 Subject: [PATCH] Copy hyperlight-wasm-runtime binary to OUT_DIR Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> --- src/hyperlight_wasm/build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hyperlight_wasm/build.rs b/src/hyperlight_wasm/build.rs index d450e1e7..66b41f63 100644 --- a/src/hyperlight_wasm/build.rs +++ b/src/hyperlight_wasm/build.rs @@ -190,9 +190,12 @@ fn build_wasm_runtime() -> PathBuf { } fn main() -> Result<()> { - let wasm_runtime_resource = build_wasm_runtime(); + let built_runtime = build_wasm_runtime(); let out_dir = env::var_os("OUT_DIR").unwrap(); + let wasm_runtime_resource = Path::new(&out_dir).join("hyperlight-wasm-runtime"); + // Copy to OUT_DIR to preserve this runtime when other feature builds overwrite the shared binary. + fs::copy(&built_runtime, &wasm_runtime_resource)?; let dest_path = Path::new(&out_dir).join("wasm_runtime_resource.rs"); let contents = format!( "pub (super) static WASM_RUNTIME: [u8; include_bytes!({name:?}).len()] = *include_bytes!({name:?});",