-
Notifications
You must be signed in to change notification settings - Fork 104
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
How to Obtain the WASM Version of Indigo Toolkit for Web Use? #2360
Comments
You can build it from the source code. There is an instruction here: https://github.com/epam/Indigo/blob/master/README.md |
You can get it from NPM repository - https://www.npmjs.com/package/indigo-ketcher |
The package does not include all the features I need. For example, I want to declare an IndigoObject and implement the functionality to directly add atoms and bonds, as shown in the addAtom function. I have been able to use these functions successfully in Python, but I am curious if it is possible to use these features, such as the ones in [indigo.h] on the web. |
I was planning to try this approach. Specifically, I want to convert the indigo module and the indigo-render module into WebAssembly (WASM). Is this possible? From the instructions, it seems like only the contents in the indigo-ketcher folder are supported, and when I tried it, I was able to convert the contents of the indigo-ketcher folder into WASM. However, my goal is to use the indigo module and indigo-render module on the web. |
"I want to convert the indigo module and the indigo-render module into WebAssembly (WASM)." - you can do that without a special wrapper which exports API to WASM. And you can see such wrapper in the indigo-ketcher. It exports the following list of functions to WASM:
If you want more functionality, you have to extend indigo-ketcher.cpp. There is no way to use indigo and indigo-renderer modules without an indigo-ketcher.cpp wrapper class. You will meet the same situation with any C++ library - you need a special wrapper to export what you need. |
If I want to use a function like indigoAddAtom in WASM, my understanding is that I need to create a corresponding wrapper function("new_function") in indigo-ketcher.cpp and then add it like this:
Is this correct? |
Is it possible to convert the Indigo Toolkit to WebAssembly (WASM) for use on the web? I couldn't find any information related to WASM on the download page, but from the issues section, it seems like the Indigo Toolkit is being used in WASM format within Ketcher. How can I obtain the WASM-converted version of the Indigo Toolkit?
The text was updated successfully, but these errors were encountered: