feat(core/rust): propagate bitcoin_only flag to Rust build

pull/1557/head
matejcik 3 years ago committed by matejcik
parent 845a66a7de
commit c06a93cba5

@ -665,7 +665,11 @@ def cargo_build():
profile = '--release' profile = '--release'
else: else:
profile = '' profile = ''
return f'cd embed/rust; cargo build {profile} --target={RUST_TARGET} --target-dir=../../build/firmware/rust' features = []
if BITCOIN_ONLY == "1":
features.append("bitcoin_only")
return f'cd embed/rust; cargo build {profile} --target={RUST_TARGET} --target-dir=../../build/firmware/rust --features "{" ".join(features)}"'
rust = env.Command( rust = env.Command(
target=RUST_LIBPATH, target=RUST_LIBPATH,

@ -617,7 +617,11 @@ def cargo_build():
profile = '--release' profile = '--release'
else: else:
profile = '' profile = ''
return f'cd embed/rust; cargo build {profile} --target-dir=../../build/unix/rust' features = []
if BITCOIN_ONLY == "1":
features.append("bitcoin_only")
return f'cd embed/rust; cargo build {profile} --target-dir=../../build/unix/rust --features "{" ".join(features)}"'
rust = env.Command( rust = env.Command(
target=RUST_LIBPATH, target=RUST_LIBPATH,

@ -6,6 +6,9 @@ edition = "2018"
resolver = "2" resolver = "2"
build = "build.rs" build = "build.rs"
[features]
bitcoin_only = []
[lib] [lib]
crate-type = ["staticlib"] crate-type = ["staticlib"]

Loading…
Cancel
Save