Closed RReverser closed 10 months ago
Ping @syrusakbary in case this one got missed as well.
This should be resolved now. All syscalls used by @wasmer/sdk
are now implemented in the wasmer-wasix
crate.
You can see the implementation in the main wasmerio/wasmer
repo, here.
While working on my WASI implementation, I was reading
fd_renumber
docs:I've noticed that Wasmer JS implementation does the following:
https://github.com/wasmerio/wasmer-js/blob/4e660caedba56e50db0da9238a789ab0e2f989be/packages/wasi/src/index.ts#L930-L933
That is, it renumbers
to
tofrom
, which goes against the naming as well as, upon close reading, against the description in docs.Then I've checked the upstream implementation of
node-wasi
by @devsnek that that code was copied from and noticed that, indeed, it used to have same incorrect implementation as well, but it was fixed there a ~year ago to:https://github.com/devsnek/node-wasi/blob/3624970047bacd19c3fef1447da56ade28f90ef3/src/index.js#L882-L885
which now correctly remaps
from
descriptor toto
.