Skip to content

Commit f450039

Browse files
committed
dep_rust.yml adding feature passthrough for run-rust-examples to support mshv3
1 parent e981c34 commit f450039

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Justfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ test-rust-int guest target=default-target features="":
107107
{{if os() == "windows" { "$env:" } else { "" } }}GUEST="{{guest}}"{{if os() == "windows" { ";" } else { "" } }} cargo test -p hyperlight-host {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} --test '*'
108108

109109
test-rust-feature-compilation-fail target=default-target:
110-
@# the following should fail on linux because either kvm or msh feature must be specified, which is why the exit code is inverted with an !.
110+
@# the following should fail on linux because one of kvm, mshv, or mshv3 feature must be specified, which is why the exit code is inverted with an !.
111111
{{ if os() == "linux" { "! cargo check -p hyperlight-host --no-default-features 2> /dev/null"} else { "" } }}
112112

113113
test target=default-target: (test-rust target)
@@ -149,15 +149,15 @@ gen-all-fbs-rust-code:
149149
just fmt-apply
150150

151151
# RUST EXAMPLES
152-
run-rust-examples target=default-target: (build-rust target)
153-
cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example metrics
154-
cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example metrics --features "function_call_metrics"
152+
run-rust-examples target=default-target features="": (build-rust target)
153+
cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example metrics {{ if features =="" {''} else { "--features " + features } }}
154+
cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example metrics {{ if features =="" {"--features function_call_metrics"} else {"--features function_call_metrics," + features} }}
155155
{{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example logging
156156

157157
# The two tracing examples are flaky on windows so we run them on linux only for now, need to figure out why as they run fine locally on windows
158-
run-rust-examples-linux target=default-target: (build-rust target) (run-rust-examples target)
159-
{{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example tracing
160-
{{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example tracing --features "function_call_metrics"
158+
run-rust-examples-linux target=default-target: (build-rust target) (run-rust-examples target features)
159+
{{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example tracing {{ if features =="" {''} else { "--features " + features } }}
160+
{{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example tracing {{ if features =="" {"--features function_call_metrics" } else {"--features function_call_metrics," + features} }}
161161

162162
# BENCHMARKING
163163

0 commit comments

Comments
 (0)