You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per #136, it's not currently possible to give a path to the root:[email protected] Wasm file on the CLI. However, it is possible to omit it from the CLI and instead supply it via the deps folder. The file name wac looks for in this case is ./deps/root/component/0.0.wasm.
Note that this does not include the patch version! This is because of this line:
The preceding lines derive a path of deps/root/component/0.0.1, but set_extension replaces the .1 with .wasm.
This seems unintentional, although perhaps I am misunderstanding the intended layout of the deps directory. I did try having a directory called 0.0.1 (which would bypass the set_extension call) with the Wasm file in it, but that just produced a "no package header was found in any WIT file for this package" error.
The text was updated successfully, but these errors were encountered:
The current behavior is definitely not intended. It's unfortunate that set_extension is more like a replace_extension when an extension already exists. I think the fix is to not rely on set_extension but instead implement the logic ourselves.
@itowlson were you interested in tackling this yourself or would you like me to submit a patch?
Consider this WAC file:
Per #136, it's not currently possible to give a path to the
root:[email protected]
Wasm file on the CLI. However, it is possible to omit it from the CLI and instead supply it via thedeps
folder. The file name wac looks for in this case is./deps/root/component/0.0.wasm
.Note that this does not include the patch version! This is because of this line:
wac/crates/wac-resolver/src/fs.rs
Line 64 in 021aae5
The preceding lines derive a path of
deps/root/component/0.0.1
, butset_extension
replaces the.1
with.wasm
.This seems unintentional, although perhaps I am misunderstanding the intended layout of the
deps
directory. I did try having a directory called0.0.1
(which would bypass theset_extension
call) with the Wasm file in it, but that just produced a "nopackage
header was found in any WIT file for this package" error.The text was updated successfully, but these errors were encountered: