Skip to content
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

Link the library from an account's Miden package when compiling the note script #346

Open
1 task
Tracked by #314
greenhat opened this issue Oct 21, 2024 · 1 comment · May be fixed by #349
Open
1 task
Tracked by #314

Link the library from an account's Miden package when compiling the note script #346

greenhat opened this issue Oct 21, 2024 · 1 comment · May be fixed by #349
Assignees
Milestone

Comments

@greenhat
Copy link
Contributor

greenhat commented Oct 21, 2024

I suggest passing the library from the Miden package as LinkedLibrary(via --linked-lib) to the midenc.

This would require to add LinkedLibrary::Masp variant that would parse the Package from the masp file and extract CompiledLibrary out of it.
Since LinkLibrary is in the midenc-session crate and Package is in midenc-codegen-masm crate, there is no way of parsing the Package in LinkLibrary impl. So we would need to re-arrange Package and/or LinkLibrary. Package seems to be destined to be in its own midenc-package crate. So I'd start there. Given that PackageManifest::link_libraries uses LinkLibrary they might end up in the same crate.

EDIT: Following our discussion, the miden-package crate with Package type should be created in the vm repo.

Tasks

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 a pull request may close this issue.

1 participant