-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Enable a runtime function without exporting it to Module #21920
Comments
The short answer is that because The long answer is that if your JS function is called from C it should probably part of the |
Thanks a lot, it works as I expected now :-). I had already tried |
How are you calling a function from --post-js from your native code? In general, native code shouldn't be able to call those symbols. (Are you building with |
And to answer your question, no I am not building with In This is not ideal though, so I am interested in investigating your solution, which would be a lot cleaner. Do you have a link to the documentation of this |
Oh .. I see, you not actually calling the functions from C, you calling them from inline JS inside of C. In that case two things. (1) You can probably just skip the (2) You can embed your dependencies directly in the C source code using |
Hi! This one should be easy but I have not found an elegant way to solve it. Using emscripten v3.1.59.
I have a JS function which is called from C, this JS function uses the
stringToNewUTF8()
library function to return a string to the C program.This JS function is added via
—pre-js
(also tried with—post-js
).Basically, I want the
stringToNewUTF8
function to be defined, but not exported to Module.Using
-sEXPORTED_RUNTIME_METHODS=stringToNewUTF8
make things work but now I getstringToNewUTF8
defined on Module, which is not useful.What is the best way to do this?
Please let me know if you need additional information on this use case.
Thanks a lot for your help!
Kind regards,
Maurice
The text was updated successfully, but these errors were encountered: