Open konradkoschel opened 4 months ago
Thanks for the PR -- generally these changes seem reasonable to me. One thing to note is that we're currently thinking of revamping Javy's CLI interface (see #702).
Given that our intention is to move in the direction described in the issue linked above, it probably makes sense to include this change as part of the new
build
command. That said, you're not expected to take on the CLI changes, for this change to land. However, I'd like to ask if you're ok waiting until we at least introduce the command that will replace the currentcompile
command in order to merge this?
Hi, thanks for the fast response! I agree on the point that it makes sense to incorporate the functionality into the upcoming build
command.
From my point of view, the option to use the standard streams as input and output for Javy is a nice addition, but it is not too urgent.
So I can surely wait :)
Hi @konradkoschel, wanted to let you know that most of the backing infrastructure for the CLI redesign has landed on main, and I think it's now a good time to rebase, update and move forward with this change. Let me know if you have any questions.
Hi @konradkoschel, wanted to let you know that most of the backing infrastructure for the CLI redesign has landed on main, and I think it's now a good time to rebase, update and move forward with this change. Let me know if you have any questions.
Hi Saul,
I updated the branch. Could you check if the code changes are fine?
As discussed previously, I made the binary output the default instead of -o -
as in the original implementation. Tests run successful on my side
Description of the change
In this PR, the CLI crate is enhanced so that a hyphen (
-
) can be passed for the input argument or the output option instead of a file name indicating that stdio streams should be used.Possible usage
Why am I making this change?
I built a wrapper around Javy. The wrapper is not inherently working with files, but to make it work with Javy, I need to write the JavaScript to the filesystem and read the WASM from the filesystem.
Generally, the changes make the CLI of Javy more flexible.
Checklist
javy-cli
andjavy-core
do not require updating CHANGELOG files.