-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Writing files from preopened directories with Reactors #22
Comments
I am just looking at another issue where this was raised, I am actually using windows at the moment, will try on my mac to see if I get the same issues. |
I have tested this on both windows and on my mac (both with absolute and relative paths) and in both instances I get an Go wat: |
The
Actually I've had the same experience before and it turns out that I have to implement my own Please refer my blog post for the detail: https://engineering.linecorp.com/en/blog/adding-experimental-webassembly-support-to-decaton-part-1/#AddingexperimentalWebAssemblysupporttoDecatonPart1-ImplementaDecatonprocessorwithWasm/WASI |
So I did some digging and it actually seems that TinyGo correctly pre-opening the files however it only does this in the command However, as a workaround, if I rename the export sed -i 's/(export "_start" (func \$$_start/(export "_initialize" (func \$$_start/g' ../go.wat I will report these things back to the TinyGo team. Next up are memory issues. |
I have been trying to write to a pre-opened directory from a Wasm Reactor however I continually get the error.
From looking into this I found this issue on wasmtime:
rust-lang/rust#79997 (comment)
It states that you must call
_initialize
in order to use pre-opened directories but I have tried this and failed to get it working.I am initiating the runtime using the following code.
Then from Go I have a simple function, the complete wat can be found below.
Before calling
file_write
I call_initialize
like so.I did get this working with a Command and adding the file write code into
main
with thewasmtime
cli but not successfully from a reactor.Kind regards,
Nic
The text was updated successfully, but these errors were encountered: