Skip to content

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

Merged
merged 4 commits into from
May 15, 2025

Conversation

greenhat
Copy link
Contributor

@greenhat greenhat commented Apr 23, 2025

Close #368

The rust_sdk_cross_ctx_note test is using the local path dependency for the account in its Cargo.toml.

@greenhat greenhat force-pushed the greenhat/i368-path-dependency branch 4 times, most recently from 37519e7 to 701f6df Compare April 24, 2025 14:10
@greenhat greenhat marked this pull request as ready for review April 24, 2025 14:13
@greenhat greenhat requested a review from bitwalker April 24, 2025 14:13
@greenhat greenhat linked an issue Apr 25, 2025 that may be closed by this pull request
Base automatically changed from greenhat/i476-note-script-compilation to next May 9, 2025 15:30
@greenhat greenhat force-pushed the greenhat/i368-path-dependency branch from 0abf514 to e2bf1d7 Compare May 12, 2025 08:09
@greenhat greenhat force-pushed the greenhat/i368-path-dependency branch from e2bf1d7 to 388162f Compare May 12, 2025 11:42
@greenhat
Copy link
Contributor Author

@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>,
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Done.

@@ -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"] }
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot! Thanks! Fixed.

Copy link
Contributor

@bitwalker bitwalker left a 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.

@greenhat greenhat merged commit 02b199f into next May 15, 2025
7 checks passed
@greenhat greenhat deleted the greenhat/i368-path-dependency branch May 15, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Miden package (account) as a local (path) dependency
2 participants