-
Notifications
You must be signed in to change notification settings - Fork 39
feature(cargo-miden): parse local path
Miden dependencies from Cargo.toml
#485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
37519e7
to
701f6df
Compare
0abf514
to
e2bf1d7
Compare
Introduce dependencies in `CompilerTest`.
e2bf1d7
to
388162f
Compare
@bitwalker I rebased it, and it's ready for a review. |
@@ -182,7 +182,7 @@ pub struct CompilerTestBuilder { | |||
/// The extra MASM modules to link to the compiled MASM program | |||
link_masm_modules: LinkMasmModules, | |||
/// Extra flags to pass to the midenc driver | |||
midenc_flags: Vec<Cow<'static, str>>, | |||
midenc_flags: Vec<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason for this change? Most of the flags we pass are constant strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The names of the dependencies (Miden package filenames) that passed via --link-library
option. They are parsed from our section in Cargo.toml
.
exec.with_dependencies(&package.manifest.dependencies).unwrap(); | ||
let trace = exec.execute(&package.unwrap_program(), &test.session); | ||
// TODO: uncomment after Paul's fix for mem intrinsics (failing u32 assert) is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix for this was merged, so this should be able to be uncommented now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.
tools/cargo-miden/Cargo.toml
Outdated
@@ -35,6 +35,9 @@ cargo-generate = "0.23" | |||
path-absolutize = "3.1.1" | |||
tokio.workspace = true | |||
cargo-config2 = "0.1.24" | |||
serde = { version = "1.0", features = ["derive"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both serde
and toml
are workspace dependencies, and due to feature unification there isn't any benefit to specifying a smaller feature set here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot! Thanks! Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few tweaks and a question, but I've marked this approved for now.
`rust_sdk_cross_ctx_note` test
Close #368
The
rust_sdk_cross_ctx_note
test is using the localpath
dependency for the account in itsCargo.toml
.