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

cli: add command to compile libraries #997

Merged
merged 3 commits into from
Jul 18, 2023
Merged

Conversation

hackaugusto
Copy link
Contributor

Describe your changes

This adds a CLI command to compile masm files to a masl, useful for CLI users.

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

@hackaugusto hackaugusto requested a review from bobbinth July 7, 2023 14:12
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a few comments inline. The main thing is that I'm thinking we should change the command to work more like this:

miden bundle <dir> --version <version> --namespace <namespace>

Where namespace is optional.

miden/src/cli/compile_lib.rs Outdated Show resolved Hide resolved
miden/src/cli/compile_lib.rs Outdated Show resolved Hide resolved
miden/src/cli/compile_lib.rs Outdated Show resolved Hide resolved
@hackaugusto
Copy link
Contributor Author

Looks good! Thank you! I left a few comments inline. The main thing is that I'm thinking we should change the command to work more like this:

This would force the user to have a different folder per bundle, that is a more constrained version of the command. For example, if there are two versions of the same library, and they share a utils, that design would require copying the code.

Should I change?

@hackaugusto hackaugusto force-pushed the hacka-cli-compile-library branch 2 times, most recently from 5ea0c33 to a284829 Compare July 13, 2023 14:08
@bobbinth
Copy link
Contributor

This would force the user to have a different folder per bundle, that is a more constrained version of the command. For example, if there are two versions of the same library, and they share a utils, that design would require copying the code.

Not sure I fully followed this: doesn't the command take all MASM files from a given directory? How would a shared directory be specified in this case? (and what namespace in the library hierarchy would it get?)

@hackaugusto
Copy link
Contributor Author

Not sure I fully followed this: doesn't the command take all MASM files from a given directory? How would a shared directory be specified in this case? (and what namespace in the library hierarchy would it get?)

My mistake. I had something else in mind. I'm making the requested changes.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I added one commit which fixes a few typos in the docs.

@bobbinth bobbinth merged commit 9155e63 into next Jul 18, 2023
15 checks passed
@bobbinth bobbinth deleted the hacka-cli-compile-library branch July 18, 2023 04:02
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.

2 participants