Why is `wac encode --define` not the default?
Closed this issue · 1 comments
It is my understanding that wasmtime
doesn't even yet support component imports. This means that components composed without the --define
option won't run in wasmtime (they don't run in wepl because of an error coming from wasmtime). Shouldn't --define
be the default instead and instead expose an --import-dependencies
option to opt into component imports?
That's a great question!
Originally I wanted to show off how small compositions can be (i.e. a few KB typically) when we're referencing things as imports.
But it does make for a poor user experience if you accidentally try to run one with component imports in Wasmtime today.
I would be fine with replacing --define
with --import-dependencies
with short form -i
(also --define
could be confused with -d
, which is the short form of --dependency
when passing the deps directly as args).
Developing tools in this space is difficult because I think we all know where we want the DX to be, but things are simply not there yet, so we should probably err on the side of a good realistic DX for today rather than for tomorrow.