I'm thinking of adding an --output CLI flag with these characteristics:
--output path/to/foo.exe (or foo.o or foo.dylib or foo, whatever you like)current_dir.join(app_filename.with_extension("")).join(default_extension) (where default_extension depends on the other flags, and might be ".exe", "", or ".o")(this would also make it so that the "whatever" in app "whatever" gets ignored in favor of your .roc filename being the source of truth for the output filename, which we've talked about wanting to do anyway
I was also thinking that if you pass a directory to --output then it uses that normal file naming scheme
in case you want the filename to be auto-generated based on the target OS (e.g. .exe for executables on Windows but not the others)
I like it, will make it easier to drive roc cli from scripts.
yeah I want it at work for basically that reason :big_smile:
hm, a problem with the "accept a directory" - if the directory doesn't exist yet, then there's no way to tell a directory was desired :thinking:
I guess if the path ends in /
If the "whatever" is to be ignored, what's the benefit in still making app authors specify it?
the plan is already to get rid of it; this is just implementing the replacement we already settled on (and then later can make parser changes to take it out)
Last updated: Jun 16 2026 at 16:19 UTC