`cargo component serve` does not show in `cargo component --help`
cargo component serve does not show in cargo component --help and this is because serve isn't a directly supported cargo-component command, like:
https://github.com/bytecodealliance/cargo-component/blob/50634428915707b34b49bebe85efb48ca82b27ca/src/bin/cargo-component.rs#L67-L76
And, instead, it is a cargo command (not really, but, as per the code's nomenclature, yes):
https://github.com/bytecodealliance/cargo-component/blob/50634428915707b34b49bebe85efb48ca82b27ca/src/lib.rs#L74-L83
I think it would be helpful to add serve as a proper cargo-component command for discoverability of the feature*.
When I added serve I just treated it as a special case of run. That’s why it’s in CargoCommand instead of Command.
I didn’t know that CargoCommands don’t get help support. Maybe this should be added for all of them, not just serve. It seems a bit strange that --help doesn’t list all commands available. A user has to guess that cargo component has for example its own run command, but fmt is just propagated. The current --help makes it seem like all subcommands except for the ones in the Command enum are propagated.