CLI
axic opened this issue · comments
The original proposal for CLI was only have a configuration format.
This briefly described in the README: https://github.com/wasmx/wasm-chisel#configuration-file-wip
@jakelang has raised that it would make sense to have a stand alone tool too.
I think we could do something like this, in line with other tools:
chisel carve
(withchisel run
for the old-school folks) which looks for a configuration file and executes itchisel carve <module> {params} <filename>
Suggestion by @jakelang
- Maybe chisel validate?
- Or just drop subcommands completely and do chisel -m , e.g chisel translate for translation etc
I think it makes sense following the internal abstraction and have create
/ validate
/ translate
:
chisel create <module> {options}
chisel validate <module> {options}
chisel translate <module> {options}
Common options:
--output
: output filename. Required forcreate
andtranslate
.--inplace
: valid for translate, in that caseoutput
is optional and it changes the source file.
Alternatively: chisel
with no subcommand will search for a chisel.yaml
, in the current dir, $HOME
, and $PATH
in that order.
chisel
with a subcommand validate | create | translate
and a module list will run specific modules of the kind on the provided binary.
The agreement is:
chisel run
searches forchisel.yml
/chisel.toml
(need to decide)chisel create
/etc. as in
#26 (comment)
I prefer yaml, but if toml is easier in Rust it is fine with me.