-
Notifications
You must be signed in to change notification settings - Fork 36
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
Use rdkit-js as vanilla.js without wasm module #272
Comments
@ninabina921 unfortunately this is not possible as rdkit-js is built on top of the main rdkit package which is built in C++ and python, wasm is the necessary building block to offer rdkit in javascript, I will close this but feel free to comment with additional thoughts if this doesn't answer your question 👍 Smiles-drawer is an alternative like you said, but it's indeed less powerful and flexible |
@ninabina921 In case this is still of interest, here: |
@ptosco this is so great! Could we adapt the dockerfile to output the fully js-compiled file? What are the caveats compared to the wasm module approach? https://github.com/rdkit/rdkit-js/blob/master/Dockerfile . An example of your emscripten config to achieve this would be greatly appreciated. Any additional explanation would be more than welcome. This is a big update and I think will allow newcomers to get started and use the library more easily since having a single js file makes it way more easy to import rdkit-js in modern front-end stacks. Please give more context here, and if it's mature enough, I'll be happy to release the lib with the fully compiled js version. Merry Christmas in advance! |
Yes, we can. Well, the main drawback is that performance is worse. The main plus is that it can be used in headless browsers like PhantomJS and Puppeteer. |
@ptosco can you share an example of the build command you use for that, basically an alternative to https://github.com/rdkit/rdkit-js/blob/master/Dockerfile#L50 to generate the vanilla js output? |
@MichelML You only need to add the following |
Thank you, will try that! |
just trying to integrate the react version into nextjs and wasnt fun
I think what's in the README and the doc site isn't nearly enough to encapsulate these steps. Even when the demo react example is working it took some reverse engineering to actually get to the steps above ^^ |
Thanks for the feedback @bugzpodder , this is something we are aware of. If you feel confident enough to make a PR to (minimally) improve the documentation based on your experience integrating the package in a react app, please help us make this project better 🙏 . Otherwise, I'll do it in a near future 👍 . |
Do you have a version of rdkit-js that is strictly javascript that does not require a wasm-module? I currently use smiles-drawer, however it lacks many features that rdkit-js has.
The text was updated successfully, but these errors were encountered: