From 6f5c601ae3617adaf3d96a0ecd8b2c21411015b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marijan=20Petri=C4=8Devi=C4=87?= Date: Fri, 6 Sep 2024 17:15:03 +0200 Subject: [PATCH] build.rs: make wasm-ast root configurable with an env-var --- wasm-rpc/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wasm-rpc/build.rs b/wasm-rpc/build.rs index 3ac13397..650ed009 100644 --- a/wasm-rpc/build.rs +++ b/wasm-rpc/build.rs @@ -1,8 +1,10 @@ use cargo_metadata::MetadataCommand; +use std::env; use std::io::Result; fn main() -> Result<()> { - let wasm_ast_root = find_package_root("golem-wasm-ast"); + let wasm_ast_root = + env::var("GOLEM_WASM_AST_ROOT").unwrap_or_else(|_| find_package_root("golem-wasm-ast")); let mut config = prost_build::Config::new(); config.extern_path(".wasm.ast", "::golem_wasm_ast::analysis::protobuf");