From 4989127c046eb023cc58aac07118de887e13cf3f Mon Sep 17 00:00:00 2001 From: Paul Schoenfelder Date: Fri, 12 Jul 2024 12:52:56 -0400 Subject: [PATCH] feat: make miden-sdk path configurable using template variables --- account/template/Cargo.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/account/template/Cargo.toml b/account/template/Cargo.toml index 9a2123a..d256860 100644 --- a/account/template/Cargo.toml +++ b/account/template/Cargo.toml @@ -10,7 +10,15 @@ crate-type = ["cdylib"] [dependencies] # Miden SDK consists of a Prelude (intrinsic functions for VM opr, stdlib) and transaction kernel API for the Miden rollup -miden-sdk = { git = "https://github.com/0xPolygonMiden/compiler", rev = "10a05d8fa76106325e2497c2d1b10f1042c77340" } +{% if compiler_path %} +miden-sdk = { path = "{{ compiler_path }}/sdk/sdk" } +{% elsif compiler_branch %} +miden-sdk = { git = "https://github.com/0xPolygonMiden/compiler", branch = "{{ compiler_branch }}" } +{% elsif compiler_rev %} +miden-sdk = { git = "https://github.com/0xPolygonMiden/compiler", rev = "{{ compiler_rev }}" } +{% else %} +miden-sdk = { git = "https://github.com/0xPolygonMiden/compiler" } +{% endif %} # Use a tiny allocator in place of the default one, if we want # to make use of types in the `alloc` crate, e.g. String. We # don't need that now, but its good information to have in hand.