CQCL / hugr

Hierarchical Unified Graph Representation
https://crates.io/crates/hugr
Apache License 2.0
15 stars 3 forks source link

Specify hugr-cli extensions #1207

Open doug-q opened 2 weeks ago

doug-q commented 2 weeks ago

@ss2165 :

Proposal:

  1. Adopt the cargo subcommand model for hugr cli. Move validation and visualisation to builtin sub commands. If hugr-<subcommand> is in PATH hugr subcommand works. Extension subcommands are independent binaries.
  2. Publish hugr-runllvm binary from hugr-llvm repo (or perhaps hugr-llvm with optional --run option, without it just outputs LLVM bitcode)
  3. 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.
  4. Guppy runner python package takes guppy module and strings together subprocess calls to hugr cli as appropriate. (edited)

Questions:

ss2165 commented 2 weeks ago

Maybe the first two questions can answer each other? i.e. hugr main commands only job is attach extensions to hugrs before calling subcommands?