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

[3/x] Link Miden packages without cross-context calls lifting/lowering #353

Draft
wants to merge 17 commits into
base: greenhat/delete-cargo-component-based-tests
Choose a base branch
from

Conversation

greenhat
Copy link
Contributor

@greenhat greenhat commented Nov 14, 2024

Close #351
Close #346

Ref #303

This PR is stacked on the #356 and should be merged after it

This PR links P2ID note script with the basic wallet Miden package, ignoring the lifting/lowering of the cross-context calls. The cross-context calls will be addressed in the subsequent PR(s).
Since this PR contains quite a few changes in various parts of the compiler, I suggest going by commits for the review process.

This PR makes the following decisions:

  • Skip registering already registered modules with the assembler to avoid duplicate registration of the intrinsics, etc. modules;
  • Recover Wasm CM interfaces as module names from the function names after assembling the library from (workaround for multiple interfaces in one Wasm core module and assembler using module name when building library exports); In the subsequent PRs Component will be used in compiler pipeline instead of Module and lifting/lowering will be done in separate modules so most likely this workaround will not be necessary
  • In library exports, #anon namespace is used with Wasm CM interface (miden:basic-wallet/[email protected]) resulting in #anon::miden:basic-wallet/[email protected] string as the export module name;
  • Populate Linker::allow_missing with linked library's exports (with removed #anon namespace);

@greenhat
Copy link
Contributor Author

@bitwalker We need high-level type signatures to link a Miden package - #354
What do you think?

@greenhat greenhat force-pushed the greenhat/i346-link-pkg-gen-miden-abi branch 3 times, most recently from 3d9b15e to 56d45c1 Compare November 26, 2024 10:16
@greenhat greenhat changed the base branch from greenhat/i346-link-lib-package to greenhat/delete-cargo-component-based-tests November 26, 2024 10:16
@greenhat greenhat changed the title [2/2] Link package, preparation for cross-context call generation [3/x] Link package, preparation for cross-context call generation Nov 26, 2024
@greenhat greenhat changed the title [3/x] Link package, preparation for cross-context call generation [3/x] Link Miden package without cross-context calls lifting/lowering Nov 26, 2024
@greenhat greenhat changed the title [3/x] Link Miden package without cross-context calls lifting/lowering [3/x] Link Miden packages without cross-context calls lifting/lowering Nov 26, 2024
@greenhat greenhat force-pushed the greenhat/delete-cargo-component-based-tests branch from 2466128 to 73262e3 Compare November 26, 2024 13:16
@greenhat greenhat force-pushed the greenhat/i346-link-pkg-gen-miden-abi branch from 56d45c1 to 6745c3f Compare November 26, 2024 13:17
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.

1 participant