Replies: 7 comments 2 replies
-
The Java String and the JavaString are different object types. Can be that will be changed with https://github.com/WebAssembly/stringref Until there is another solution you can use: Can be that this signatures will be change because it is a hack from the first days. I think the int[] as return value should work without any hacks. On the JavaScript side you should receive an Int32Array. |
Beta Was this translation helpful? Give feedback.
-
Sounds like that you does not have use the generated JavaScript: https://github.com/i-net-software/JWebAssembly/wiki/Getting-Started#html-template
Sounds like that you does not have use the needed library jwebassembly-api: https://github.com/i-net-software/JWebAssembly/wiki/Getting-Started#add-dependency-to-api What should the error message be to make it clear that the library is missing? |
Beta Was this translation helpful? Give feedback.
-
I am not able to generate something like HelloWorld.wasm.js file. This is my main code:
Is this the right way? How to generate js and html files? |
Beta Was this translation helpful? Give feedback.
-
Do you want write your own build system? This is high level for the beginning. Why do you does not use Gradle for building? You must also set library (addLibrary). If you does not have write your own then you need to use jwebassembly-api.jar
Which files are produced? The HTML file with your base structure must you write self. |
Beta Was this translation helpful? Give feedback.
-
If you want use the release version 0.4 of the API and not the snapshot version this can work. You will know it if you run it. |
Beta Was this translation helpful? Give feedback.
-
Do you have solve your problem? If not what is the console output of your Gradle script? |
Beta Was this translation helpful? Give feedback.
-
Yes we finally were able to run the gradle task 'wasm' and generate the required files. Used version master-SNAPSHOT instead of 0.4. Then it worked. Thanks for the help. Will get back to you if there an any issues. |
Beta Was this translation helpful? Give feedback.
-
Hi,
How do we export Strings or Arrays from the java file using JWebAssembly? Any ideas? Please let me know.
How to get something like the below code working?
or maybe something with arrays like:
Thanks
Beta Was this translation helpful? Give feedback.
All reactions