-
Notifications
You must be signed in to change notification settings - Fork 3
Update kmir run
to behave more like cargo run
#524
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
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!
kmir/src/kmir/__main__.py
Outdated
target = opts.bin if opts.bin else cargo.default_target | ||
smir_file = cargo.smir_for(target) |
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.
This is where the --file
option would be implemented: if given, smir_file is taken from there instead of asking
cargo`.
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
CargoProject
class which can be used to gather information about a cargo project.kmir run
now usesCargoProject
which finds the.smir.json
artifact in the target directory after invokingcargo build
.Note that currently either
RUSTC
will need to be set to thestable-mir-json
install, or the smir json files should already have been built that way and exist in the target directory. Later, we can get rid of this requirement when we packagestable-mir-json
withkmir
.