Adopt the cargo subcommand model for hugr cli. Move validation and visualisation to builtin sub commands. If hugr-<subcommand> is in PATHhugr subcommand works. Extension subcommands are independent binaries.
Publish hugr-runllvm binary from hugr-llvm repo (or perhaps hugr-llvm with optional --run option, without it just outputs LLVM bitcode)
Guppy specific compilation passes can be added to hugr build builtin subcommand. Customisable as hugr build --passes "guppy_pre" "guppy_opt_2" "guppy_post", or something similar.
Guppy runner python package takes guppy module and strings together subprocess calls to hugr cli as appropriate. (edited)
Questions:
Does hugr do anything except delegate to subcommands?
The subcommands must control which extensions are used. This means every "leaf" downstream, which is where extensions are known, needs it's own subcommand.
Should hugr-cli provide helpers to parse + validate a hugr? What else?
@ss2165 :
Questions:
hugr
do anything except delegate to subcommands?hugr-cli
provide helpers to parse + validate a hugr? What else?