-
Notifications
You must be signed in to change notification settings - Fork 167
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
Using C++ string results in fd_close
, fd_seek
& fd_write
, even for BAREMETAL compile
#220
Comments
I still think If you build with |
Out of interest is there some fundamental reason why you don't use those |
I am writing C++ code for the internet computer, and I am a bit stuck at the moment trying to use strings.
I studied the discussion in this issue in great detail, and I made good progress after I edited the WASI SDK’s Makefile to disable assertions while opting into baremetal mode:
With this patch, I could get the following to work:
I compile it with:
When converting the
ok.wat
usingwasm2wat
, the only import function is the one I specify, and the fileok.wat
is really tiny:This file
ok.wasm
could be deployed without any issues.Then I tried to use a string, and that did not work:
I compile it in the same way, but now the file
nok.wat
is much bigger and contains imports forfd_close
,fd_seek
&fd_write
:I tried to apply the techniques explained in the other issue to hunt down the reason and then patch it, but was not able to.
Any tips how to get rid of these imports would be greatly appreciated.
The text was updated successfully, but these errors were encountered: