Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

build.rs: make wasm-ast root configurable with an env-var #79

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion wasm-rpc/build.rs
Original file line number Diff line number Diff line change
@@ -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");
Expand Down
Loading